Operating System - HP-UX
1753731 Members
4564 Online
108799 Solutions
New Discussion юеВ

Re: Change permission to 755

 
SOLVED
Go to solution
Jose Mosquera
Honored Contributor

Re: Change permission to 755

Hi,

The umask mask command sets a new file mode creation mask **for the current shell execution environment**.
In your case you are setting **whole** file creation for your active session to 777 file mode, this is very risky concerning system security.
Please carefully read the documentation about:
#man umask

Security practices suggest an umask 022 mode.

Rgds.
Manix
Honored Contributor

Re: Change permission to 755

As Jose said , don`t change umask for the sake of single file.

Thanks
Manix
HP-UX been always lovable - Mani Kalra
Chui Kock You_1
Frequent Advisor

Re: Change permission to 755

Hi Manix,

I've done that on the umask command. It won't corrupt the file. What is the different between the lchmod and the umask? Any manual.

Regards,
Chui
Manix
Honored Contributor

Re: Change permission to 755

lchmod is a system call to change link permission , not a standard command.

Looks at what Clay stated.

The system call chmod() follows the symbolic link and thus does not operate on the symbolic link directly. Similarly, the symlink() system call does not allow a mode argument so that don't work neither. However, there is an UNDOCUMENTED system call, lchmod(), that does operate directly on the symbolic link.


umask - set or display the file mode creation mask.

The mask affects the initial value of the
file mode (permission) bits for subsequently created files.

So umask sets the default file permissions.
HP-UX been always lovable - Mani Kalra
Chui Kock You_1
Frequent Advisor

Re: Change permission to 755

Hi Guru,

Thanks for the help.

Regards,
Chui
Dennis Handly
Acclaimed Contributor

Re: Change permission to 755

>Can I used the command umask 000 to change from

Only if you remove then recreate the symlink.
Since you only want to change umask for this one file, you may want to put this in a script so the old umask is restored.