You are not logged in.
Pages: 1
ls -ld /home/public/
drwxrwsr-x+ 9 samba users 4096 2009-11-08 20:20 /home/public/
[pyther@mongo home]$ getfacl public/
# file: public/
# owner: samba
# group: users
# flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
[pyther@mongo home]$ ls -l /home/pyther/.vimrc
-rw-r--r-- 1 pyther users 288 2009-10-20 16:55 /home/pyther/.vimrc
[pyther@mongo home]$ cp -r /home/pyther/.vimrc public/vim
[pyther@mongo home]$ getfacl public/vim/
# file: public/vim/
# owner: pyther
# group: users
# flags: -s-
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
Works as expected
[pyther@mongo public]$ mkdir test
[pyther@mongo public]$ getfacl test/
# file: test/
# owner: pyther
# group: users
# flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
[pyther@mongo public]$ touch test/game.txt
[pyther@mongo public]$ getfacl test/game.txt
# file: test/game.txt
# owner: pyther
# group: users
user::rw-
group::rw-
other::r--
What I want is for public/vim/ to have group rwx permissions automatically.
What am I doing wrong / misunderstanding? How can I get the desired results?
Last edited by pyther (2009-11-09 18:35:47)
Offline
umask 0000
Then try again. I just now found out that I can display the umask simply by calling umask without arguments. And that if you don't set it, it's 0022 by default.
(Someday all the permission/acl stuff will be implemented cleaner and more straightforward (I hope -.-))
edit: Oh and as this is your second post about acl, this might help (especially if you want to copy files into directories): http://bbs.archlinux.org/viewtopic.php?id=54420
Last edited by rine (2009-11-09 22:19:33)
Offline
Just so I understand this correctly
Currently it is impossible to achieve what I am trying to do. From what I understand most applications write files/folders with 777 and then let the umask take care of the rest. Because of this the default group permissions do not get inherited.
The suggested solution is to run a crontab every x minutes or setup incrond, correct?
Offline
Well for what you want to do you could just set umask to 0002 I guess. At the time I wrote in that other thread I don't think I thought about umask. Isn't this what you are looking for?
rine@archy ~/tmp/huk $ getfacl .
# file: .
# owner: rine
# group: users
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
rine@archy ~/tmp/huk $ mkdir bla
rine@archy ~/tmp/huk $ getfacl bla
# file: bla
# owner: rine
# group: users
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
rine@archy ~/tmp/huk $ umask 0002
rine@archy ~/tmp/huk $ mkdir bla2
rine@archy ~/tmp/huk $ getfacl bla2
# file: bla2
# owner: rine
# group: users
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
Btw, how did you get
# flags: -s-
?
On my machine that's missing and I can't find anything in the man page.
Last edited by rine (2009-11-10 00:15:10)
Offline
You are correct setting umask to 002 would work, but I still like my gui file manager. AFAIK it is not possible to set a umask with a file manager.
chmod preserves a directory's set-user-ID and set-group-ID bits unless
you explicitly specify otherwise. You can set or clear the bits with
symbolic modes like u+s and g-s, and you can set (but not clear) the
bits with a numeric mode.
So the -s- sets the group id for all new files and folders that get created based on the parents folder's gid.
chmod g+s folder
chmod 2775 folder
Either of those commands would set the group id.
I hope that makes sense.
Offline
You are correct setting umask to 002 would work, but I still like my gui file manager. AFAIK it is not possible to set a umask with a file manager.
It is. I just set umask and started thunar from the same shell. I don't know how you start your filemanager, but you can do things like
alias thunar='umask 0002 && thunar'
or something similar.
chmod preserves a directory's set-user-ID and set-group-ID bits unless
you explicitly specify otherwise. You can set or clear the bits with
symbolic modes like u+s and g-s, and you can set (but not clear) the
bits with a numeric mode.So the -s- sets the group id for all new files and folders that get created based on the parents folder's gid.
chmod g+s folder
chmod 2775 folderEither of those commands would set the group id.
I hope that makes sense.
Oh, no I know what they are
It's just that my getfacl doesn't show it.
Offline
Pages: 1