![](https://seccdn.libravatar.org/avatar/7741cb80e9ef59b88711633bf3cce161.jpg?s=120&d=mm&r=g)
Hi everybody, i want to give a permission to write for all users for a file, but i don' t want give the same permissions to the folder where the file is. Example total 894 drwxr----- 4 macrame users 239 ott 3 14:27 Mail in Mail i have this: total 8 -rwxrwxrwx 1 macrame users 1018 ott 3 14:26 IN.default -rwxrw---- 1 macrame users 0 set 21 11:15 Inbox -rwxrw---- 1 macrame users 3353 ott 3 08:35 Sent -rwxrw---- 1 macrame users 0 ott 3 08:34 Unsent -rwxrw---- 1 macrame users 0 mar 8 2001 inbox If i want to write _IN.default_ (like a new user) i have to change _Mail_, but if i do it the new user can write in the folder, make new files, etc. How can i resolve it? Regards Massimo -- E impari che puoi davvero sopportare, che sei davvero forte, e che vali davvero. --- --- HomePage: http://spazioweb.inwind.it/arnaudo LinuxGroup: http://lugge.ziobudda.net
![](https://seccdn.libravatar.org/avatar/4ec991e518f97d6bb6a9440ed78bda80.jpg?s=120&d=mm&r=g)
On Wed, Oct 03, 2001 at 02:43:48PM +0200, marnaudo@inwind.it wrote:
Hi everybody, i want to give a permission to write for all users for a file, but i don' t want give the same permissions to the folder where the file is. Example
total 894 drwxr----- 4 macrame users 239 ott 3 14:27 Mail
in Mail i have this: total 8 -rwxrwxrwx 1 macrame users 1018 ott 3 14:26 IN.default -rwxrw---- 1 macrame users 0 set 21 11:15 Inbox -rwxrw---- 1 macrame users 3353 ott 3 08:35 Sent -rwxrw---- 1 macrame users 0 ott 3 08:34 Unsent -rwxrw---- 1 macrame users 0 mar 8 2001 inbox
If i want to write _IN.default_ (like a new user) i have to change _Mail_, but if i do it the new user can write in the folder, make new files, etc.
The new user will have permission to write to the file, just not rename it, delete it, etc. If you are having problems, it may be due to the editor being used trying to create extra backup files, etc. -- David Smith Tel: +44 (0)1454 462380 (direct) STMicroelectronics Fax: +44 (0)1454 617910 1000 Aztec West TINA (ST only): (065) 2380 Almondsbury Home: 01454 616963 BRISTOL Mobile: 07932 642724 BS32 4SQ Work Email: Dave.Smith@st.com Home Email: David.Smith@ds-electronics.co.uk
![](https://seccdn.libravatar.org/avatar/04e9b659dabb6ef88308aa2c68abeb3e.jpg?s=120&d=mm&r=g)
Massimo Arnaudo wrote:
i want to give a permission to write for all users for a file, but i don' t want give the same permissions to the folder where the file is.
The user needs execute permission ('x') on the directory to be able to access files inside. Read permission on a directory enables to see the filenames in the directory, but not to access the files.
Example
total 894 drwxr----- 4 macrame users 239 ott 3 14:27 Mail
in Mail i have this: total 8 -rwxrwxrwx 1 macrame users 1018 ott 3 14:26 IN.default -rwxrw---- 1 macrame users 0 set 21 11:15 Inbox -rwxrw---- 1 macrame users 3353 ott 3 08:35 Sent -rwxrw---- 1 macrame users 0 ott 3 08:34 Unsent -rwxrw---- 1 macrame users 0 mar 8 2001 inbox
If i want to write _IN.default_ (like a new user) i have to change _Mail_, but if i do it the new user can write in the folder, make new files, etc.
No, write permission on the directory is not necessary. All you need is a `chmod g+x Mail`. With read but not execute permission on the directory the user can list the directory, but is not able to access anything inside the directory. Eilert -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Eilert Brinkmann -- Universitaet Bremen -- FB 3, Informatik eilert@informatik.uni-bremen.de - eilert@tzi.org http://www.informatik.uni-bremen.de/~eilert/
participants (3)
-
Dave Smith
-
Eilert Brinkmann
-
Massimo Arnaudo