Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am sharing files with NFS from a Solaris 2.6 server to a Linux Red Hat EL 4 client and also to other solaris 2.6 clients. On the solaris clients, write access is correctly controlled by file permissions. On the the Linux client, any user can edit or delete any file, regardless of the file permissions! Can anyone help me fix the system so that unauthorized users on the RH box can't edit files?

Some extra info: -Folder is shared as rw with NFS -Shared folder has drwxrwxrwx permissions.

For example: frank@linux$ ls -l test.txt

-rw-r--r-- joe engineer test.txt

frank@linux$ rm test.txt

are you sure you want to remove write protected file (y/n): y

the file text.txt is deleted by user frank who does not have write priveledges to this file.

share|improve this question
    
For example: frank@linux$ ls -l test.txt\n -rw-r--r-- joe engineer test.txt \nfrank@linux$ rm test.txt are you sure you want to remove write protected file (y/n): y \nthe file text.txt is deleted by user frank who does not have write priveledges to this file. –  joshxdr Jan 25 '10 at 22:17

1 Answer 1

up vote 1 down vote accepted

If the folder is 777, this is expected behavior on Linux.

Try 1777 (i.e., turn on the sticky bit) on the directory and only the file owner will be able to modify it.

share|improve this answer
    
Just saw this comment now, I will try this out tomorrow. –  joshxdr Jan 26 '10 at 23:31
    
Hmmm, I had assumed that to to delete a file you needed write permission to the directory AND write permission to the file. Are you saying that is an OR function? –  joshxdr Jan 27 '10 at 2:41
    
Yes, it's effectively an 'or' without the sticky bit. See linuxfocus.org/English/January1999/article77.html and scroll down to the "T-bit, SUID and SGID" section. –  Jon Lasser Jan 27 '10 at 9:50
    
Ok, I see now that I did not understand the meaning of file permissions correctly. Thanks for answering my noob question. –  joshxdr Jan 27 '10 at 14:11
    
Hey, outside of ugo/rwx, all of the remaining permission bits are weird. Not really a noob question, more an obscure corner of the OS. –  Jon Lasser Jan 27 '10 at 21:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.