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.

Hi can I make in linux any future file created in some directory, writable.

Thank you

gidi

share|improve this question
1  
Did you consider using ACLs? –  Khaled Jan 21 '11 at 12:14
    
I'm not the admin so, it sounds too big step for this aim –  gidireich Jan 21 '11 at 12:31
add comment

2 Answers

Use umask. For instance :

umask 0000

Will make files created afterwards (ie, in the same session) have the rw permissions for everyone :

-rw-rw-rw-

Should you want to make that change persistant, just place it into ~/.bashrc (assuming your shell is bash).

umask works by bit-masking the default permissions used on file creation, check its man page for more details.

share|improve this answer
    
Thanks. How can I set this for a single specific directory? –  gidireich Jan 21 '11 at 12:07
    
Short answer : you can't, umask works on a per-session basis. I had overlooked this requirement in your question. If you can't use ACLs, I guess you could hack something into your user's .bashrc to set the umask only when in this specific directory. –  François Feugeas Jan 21 '11 at 14:02
add comment

You may also use the setuid-bit on a directory to force all created files to a specific group.

See: http://en.wikipedia.org/wiki/Setuid#setuid_and_setgid_on_directories

share|improve this answer
    
This is nice, but will not do the trick –  gidireich Jan 21 '11 at 12:33
add comment

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.