cancel
Showing results for 
Search instead for 
Did you mean: 

File Permissions

SOLVED
Go to solution
LM_2
Frequent Advisor

File Permissions

I have a question about file permissions. I have a user who creates a file - and the file is set to be read only - no other user can change the permissions or chown on the file. How do I change this so that when a user creates a file - all other users have access to it. I created a new file and it looks like this:
-rw-r--r-- 1 morris users 32 Apr 21 12:01 morris.test

The directory permissions look like this:
drwxrwxrwx 19 fea users 8192 Apr 21 12:02 MLS

10 REPLIES
Michael Schulte zur Sur
Honored Contributor

Re: File Permissions

Hi,

have a look at man umask. You can set the default access when a file is created.

hth,

Michael
LM_2
Frequent Advisor

Re: File Permissions

Where does this get set at?? I looked at the man pages for umask - and looked all over for where to put this:

umask u=rwx,g=rwx,o=rwx

but it doesn't work - my files keep getting the 022 permissions. I added the above command to the .cshrc file - but that still doesn't work. I am totally a VMS person - so TRU64 still confuses me.
LM_2
Frequent Advisor

Re: File Permissions

I did find that I need to make the change in the /etc/profile - it was set to umask 022 - I changed it to 000. This is good - but was asked by one of my user's if it were possible for them to chown or chmod on the file - this I can not do - but if the user has rw - they should be okay on everything - correct...??
Michael Schulte zur Sur
Honored Contributor
Solution

Re: File Permissions

Hi,

I would advise strongly against placing that in /etc/profile, which would make it global and your system insecure. Put it into the users' .profile, that need it. chmod may work but chown I doubt.

hth,

Michael
Ann Majeske
Honored Contributor

Re: File Permissions

Hi,

I suggest that you review the chapter on "Controlling Access to your Files and Directories" in the Command and Shell User's Guide as well as the man pages for chmod and chown. Only the owner of a file or the root user is allowed to change the owner or permissions of a file.

There's a book that you might find useful "UNIX for VMS Users" by Philip E Bourne. It was printed by Digital Press years ago, but I don't know how you would go about getting a copy.

Ann
Roberto Polli
Trusted Contributor

Re: File Permissions

I read man pages, but it seems to me that is not possible to set an umask thru /etc/fstab or mount for a given directory.
Is it so?

Peace, R.
Michael Schulte zur Sur
Honored Contributor

Re: File Permissions

Robert,

that's right. Who or what gave you the idea? Do you have a question?

greetings,

Michael
Roberto Polli
Trusted Contributor

Re: File Permissions

Michael,
are you talking to me? Well... my name is Robert_o_ ;-)

I work mainly on linux so I thought about vfat/umask...
I tried unsuccessfully to search umask in "man /etc/fstab"
Peace, R.
Michael Schulte zur Sur
Honored Contributor

Re: File Permissions

Hi Roberto,

yes, I was talking to you. I obviously overlooked the last o or forgot it when typing. :-(

greetings,

Michael
Roberto Polli
Trusted Contributor

Re: File Permissions

Ok Michael,
I'll forgive your missing "o" :-DDD
You Welcome!

Peace, R.