LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Chmod rights and folder access (https://www.linuxquestions.org/questions/linux-general-1/chmod-rights-and-folder-access-356413/)

fieldyweb 08-24-2005 03:29 AM

Chmod rights and folder access
 
i'v ehad a look on this forum, and can't see anything which might be what im asking, but if there is and this is a dupicate i apologise...


I've got smaba enabled on a linux PC and 10 XP workstations connecting to the Linux PC.. One of the SMB shares is setup for students to save thier work in a frade level folder, so the directory structure looks something like this...

example

Open Work Folder i see

Grade1
Grade2
Grade3
Grade4

If i double click on grade1 folder in XP is see a list of students names in that class

David
May
somchai

If the student wants to save thier work they save it in thier folder... this is a fudge until i get PDC working on Samba, my question is, these kids are youndg and have the tendencie to move/delete/erase these folders because they can't use a mouse properly, or whatever..

How do i use CHMOD or any other command to set up so that the students Cant move delete or destroy the folders, but can save work within thier folder..? and in thier folder they can add files delete files rename files etc, just not the actual folder structure

(The actual final solution will be that they map a drive using a login script directly to thier folder.. but thats not happening right now)

dub.wav 08-24-2005 03:48 AM

I don't think it can be done with file permissions, but a little googling showed that samba has a recycle module, which works as a trashcan.
http://us1.samba.org/samba/docs/man/...html#id2630177
and
http://us1.samba.org/samba/docs/man/...html#id2630976

Nathanael 08-24-2005 04:05 AM

you can set a sticky bit on the folder on the linux box, which then means that the owner only is allowed to rename / move /delete the directory .
i think it works as follows
as root:
mkdir blah
chmod 1660 blah
chown root:studnetgroup blah

this should result in the users in group studentgroup can save files in there, but only root can delete the directory

and on top of that i would make backups for the students - you never know what can happen! and you never know when you could make a mistake... so if you work on the server, and something should go wrong and accidentially delete the share... your students would not be too impressed

fieldyweb 08-24-2005 04:12 AM

Thats great, thank you


All times are GMT -5. The time now is 02:33 PM.