SuSE 9.3, all YOU updates. # rpm -q samba samba-3.0.13-1.1 #testparm ......... [in] comment = File Exchange. path = /storage/ force user = samba_quota read only = No create mask = 0644 guest ok = Yes ......... /storage is reiserfs 3.6 when i create file: #ls /storage -rw-r--r-- 1 root root 137 Nov 22 2004 readme.txt i thought that users coming to \\srv\in only can read file readme, but they can /DELETE/ this file !!! Help!
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 suse-list wrote:
comment = File Exchange. path = /storage/ force user = samba_quota read only = No create mask = 0644 guest ok = Yes
i thought that users coming to \\srv\in only can read file readme, but they can /DELETE/ this file !!!
by "force user" you create a file which the user of course can delete (in "create mask" the 6), since it is always the same user (same user at creating and deleting the file) HTH Stefan P.S.: Sorry for the private mail -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDS6pnjWQnQzhUJmURAsffAKCNeyK3XILDo1nhy+jgGmcw9CXBswCfR31r HDBfYQSHAdd0fCoiRgaflBA= =eyWE -----END PGP SIGNATURE-----
Hello, Am Dienstag, 11. Oktober 2005 13:55 schrieb suse-list:
samba-3.0.13-1.1 [in] path = /storage/ force user = samba_quota [...] #ls /storage -rw-r--r-- 1 root root 137 Nov 22 2004 readme.txt
i thought that users coming to \\srv\in only can read file readme, but they can /DELETE/ this file !!!
Deleting a file requires write access to the _directory_ containing it. So if user "samba_quota" has write access to the directory, he also can delete any file in it. However, he can't delete files in a subdirectory (or the whole subdirectory) if he hasn't write permissions in that directory. (But he can delete empty directories, to be complete.) BTW: All I wrote isn't samba-specific. Regards, Christian Boltz -- Ausserdem bin ich ja zum Glück unkündbar... Sklaven werden verkauft und nicht gekündigt! ;-) [Thilo Alfred Bätzig in suse-linux]
Christian Boltz wrote:
Deleting a file requires write access to the _directory_ containing it. So if user "samba_quota" has write access to the directory, he also can delete any file in it.
However, he can't delete files in a subdirectory (or the whole subdirectory) if he hasn't write permissions in that directory. (But he can delete empty directories, to be complete.)
BTW: All I wrote isn't samba-specific.
Moreover, the simple action of removing a file from a directory does not mean that the file is going to be "really" removed. The file is going to be deleted if it only has 1 link left #ls /storage
-rw-r--r-- 1 root root 137 Nov 22 2004 readme.txt ^^^ |||
... but in the case of a file that has several links, you are only removing the link to the file that is under your control, which might have a different meaning than "removing a file". A user can choose which files his directory links to, regardless of the fact that the files belong to him or not :-) Again, this is not samba-specific but might help understanding why there is a difference in having write access to a directory and read only access to a file... and being able to remove links to a file does not always mean being able to delete the file. Ariel
Regards,
Christian Boltz
participants (4)
-
Ariel Sabiguero Yawelak
-
Christian Boltz
-
Stefan Nowy
-
suse-list