Really stupid question.
I have a number of samba shares.
These shares have a number of folders.
I want users to be allowed to do anything they want *inside* the folders, but not be able to move, delete, or rename the existing folders, and not create new folders.
This has to be a file permissions thing on the back end. What's the magic spell I'm looking for with chmod/chgrp so that users can create things INSIDE the folders but not touch the folders themselves?
I have a number of samba shares.
These shares have a number of folders.
I want users to be allowed to do anything they want *inside* the folders, but not be able to move, delete, or rename the existing folders, and not create new folders.
This has to be a file permissions thing on the back end. What's the magic spell I'm looking for with chmod/chgrp so that users can create things INSIDE the folders but not touch the folders themselves?
(no subject)
Date: 2009-07-28 05:27 pm (UTC)(no subject)
Date: 2009-07-28 06:06 pm (UTC)However, the magic spell I was looking for was "make sure the user/group that Samba is forcing doesn't have write permission on the parent directory".
As long as the script to create directories runs itself as a user who DOES have write permissions to the parent and then sets the child correctly, it's good.
(no subject)
Date: 2009-07-28 07:15 pm (UTC)(no subject)
Date: 2009-07-28 07:26 pm (UTC)But I deny them write on the *parent*.
/parent/child/files
They have Write on the child, so they can change/delete files.
They don't have Write on the Parent, so they can't rename/delete the child.
The main issue was just making the user/group that Samba is forcing to lose write on the parent.
(no subject)
Date: 2009-07-28 09:00 pm (UTC)sudebar: 3 new servers arrived at work today. they had the wrong power supply, so they could not be plugged in. They also had no screws or connectors to help anyone put them into our rack, despite the install being a service we paid for. The company that brought them had 2 months to get them ready and still ignored these "minor" details. It's really only tangentially related, but I didn't want to write a whole post about it. Complaining to one nerd will do.
(no subject)
Date: 2009-07-28 05:39 pm (UTC)a chmod of drwxr-xr-x (chmod 755 foldername) gives users permission to enter a directory (folder) and view the contents within but not add or delete anything inside the directory.
a chmod of drwxrwxrwx (777) lets users rape and pillage inside of that directory til their hearts content.
But the permission to change a directory's own properties are controlled by the permissions on the preceding directory.
So if I had a file structure of /watermelon/grapefruit/ and wanted users to be able to do whatever they want inside grapefruit/ but not change grapefruit itself, I would chmod /watermelon/grapefruit to 777 and then chmod /watermelon to 755 in order to keep people from molesting the grapefruit folder itself.
People would be able to create folders behind grapefruit but not inside watermelon
then use ls -l to view the long directory listing and verify the permissions
(no subject)
Date: 2009-07-28 06:06 pm (UTC)