LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Advanced File Permissions (https://www.linuxquestions.org/questions/linux-software-2/advanced-file-permissions-56520/)

mrsolo 04-24-2003 12:02 AM

Advanced File Permissions
 
In windows, you can specify advanced file permissions. You could specify extended permissions like delete, modify. I want to be able to do this in linux. Is there a way to tell a directory that a person can modify a file but not erase it? I would like to be able to give a user permission to upload to a directory but not be able to erase files in it.

Mik 04-24-2003 03:01 AM

For a filesystem an extra delete permission isn't very usefull. If you give someone write permissions they can delete the contents of the file without deleting the file itself. Which in the end is just as bad.

But you are talking about uploading files. Is this a directory which will only be accessed through an ftp program? Because most ftp servers allow you to set stricter permissions. This can usually be done by disabling commands (like the delete command). In proftpd you would use the Limit directive for this.

jharris 04-24-2003 03:31 AM

If you set the 'sticky bit' on a directory (using chmod [check the man page I can't remember the code in my pre-coffee state]) then people are only able to delete files that they own, I'm not sure if thats any use to you. There are some linux file systems that support Access Control Lists that would give you the kind of functionality that you've described but its not widely supported yet. Have look through some of the following http://www.google.com/search?hl=en&i...ilesystem+ACLs

HTH

Jamie...

nakkaya 04-24-2003 08:33 PM

thats kind of useless man lets say i upload ed homework.txt and wan to delete it just send a empt homework.txt to the directory and and works for other files to

wapcaplet 04-24-2003 08:50 PM

Presuming you're talking about WinNT and derivatives (2000, XP), I recently learned that NT's filesystem supports finer control over permissions. It's possible, for example, to grant only a specific user certain permissions, or restrict some user from permissions. To do something like that with ext2/3, you'd have to do some weird group stuff, making it pretty hard to do.

Maybe some of the other filesystems supported by Linux would give that kind of permission control? (Dunno, I haven't tried them.)

Though, as everyone else has pointed out, you can use the "sticky" bit to do what you're describing:

chmod g+t directory_name

Read the chmod manpage for more details.


All times are GMT -5. The time now is 07:27 AM.