views:

43

answers:

2

I have the folder called backups. The root is putting backups in that folder. I want that all the files which are created in that folder should have group write permission.

I know i can use umask but i want to know that will umask work for all the files any where or it will work on particular folder.

e,g i want umask for only /backups folder not any where else

A: 

You can change permissions after creation, with

chmod g+w files
enzotib
+1  A: 

One possibility is to use access control lists. The filesystem containing /backups needs to be mounted with the acl option. Then give access to the group that should have it:

setfacl -d -Rm group:backup-group:rwx /backups
setfacl -Rm group:backup-group:rwx /backups

All subsequently created files and directories under /backups will be writable by backup-group, unless the backup program explicitly uses restrictive permissions (if it's storing archive files of some kind, you'll be ok, but if it's e.g. rsync preserving permissions, that won't do).

Another possibiliyt is to use bindfs to provide a view of /backups (mounted at a different location) with different permissions.

Gilles