Results 1 to 10 of 10
umask is used to se a default permission for creating files.
Is there something like this to set the default ownership for any new file?...
- 05-19-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 20
Is there a mask for ownership like umask?
umask is used to se a default permission for creating files.
Is there something like this to set the default ownership for any new file?
- 05-19-2008 #2
- 05-19-2008 #3
suppose that there is a default ownership and it says every new file is defaulted to root.
if a user(who does not have root access ) creates a file and forgets to set the ownership to him/herself then that file is lost as he/she cant get it back without root access.Linux and me it's a love story
- 05-19-2008 #4
It's not a mask, but you can predict who the owner and controlling group will be, and can use umask to set the permissions of the controlling group.
The owner of a newly-created file is the creator, obviously, but the group is the primary group as specified in /etc/passwd. The fourth field for a user in /etc/passwd is the GID of his primary group. Knowing this, you could change the primary group to what you want, and use umask to give it the permissions you desire.
Hope this helps.DISTRO=Arch
Registered Linux User #388732
- 05-19-2008 #5
Linux is based on Discretionary Access Control (DAC).
I think what you are looking for is Mandatory Access Control (MAC)
I believe that there are some security enhancing applications that can add MAC controls ... that may solve your problem.
Men occasionally stumble over the truth,
but most of them pick themselves up
and hurry off as if nothing had happened.
Winston Churchill
... then the Unix-Gods created "man" ...
- 05-20-2008 #6Just Joined!
- Join Date
- Apr 2008
- Posts
- 20
- 05-20-2008 #7
I'm sure you already know this, but just in case you don't:
If you're doing things by hand (as opposed to a script which automates things), then chown's -R switch could be very useful.--
Bill
Old age and treachery will overcome youth and skill.
- 05-21-2008 #8Just Joined!
- Join Date
- Apr 2008
- Posts
- 20
- 05-21-2008 #9Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
- 05-23-2008 #10Just Joined!
- Join Date
- Apr 2008
- Posts
- 20


Reply With Quote
