Operating System - HP-UX
1832595 Members
3036 Online
110043 Solutions
New Discussion

/tmp change permission to 755

 
SOLVED
Go to solution
haneps
Occasional Advisor

/tmp change permission to 755

Hi Sirs,

Greetings.

I am writing to make an inquiry pertaining /tmp in my hp-ux box changes permission by itself.

HP-UX xxx B.11.00 U 9000/800

I have changed the permission back to 1777 though, the permission looks alright now.

Have anyone encountered this problem before?
7 REPLIES 7
TTr
Honored Contributor
Solution

Re: /tmp change permission to 755

> changes permission by itself.
It does not change by itself. There is probably a script that does it unintentionally. Check all your scripts that run as root if they contain the "chmod" command. Sometimes the chmod command is preceded by a "cd" or a mkdir command. If either command fails, and the script is in /tmp the chmod will apply to /tmp.
haneps
Occasional Advisor

Re: /tmp change permission to 755

Hi,

Thanks for taking time to answer my inquiry.

I couldn't find anything inside the root crontab that relates to this matter.

Any other places should I check?
Johnson Punniyalingam
Honored Contributor

Re: /tmp change permission to 755

Hi ,

have you check the history of the root account, could be some one must have changed the permission,
(i mean sh_history)

would be easier if you server has the audit_logs turn-on, so that you could trace back commands issued by root or root equal account

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor

Re: /tmp change permission to 755

Is this the only directory or file getting changed? Can you look at any directories in /tmp?
If not, it means that chmod didn't have -R.
haneps
Occasional Advisor

Re: /tmp change permission to 755

sh_history doesnt show anything related to the permission changes.

Dennis, yes, the chmod has been done without -R, all permissions beneath /tmp stays intact.

Think I would leave it as it is and monitor if the same issue happened again.

Thanks all for giving me feedback and ideas :)

Dennis Handly
Acclaimed Contributor

Re: /tmp change permission to 755

You could also scan the rc(1m) scripts in /sbin/init.d/.
I'm not sure whether a ll -d -c /tmp will tell you when the permission changed or when the last file was added there?
TTr
Honored Contributor

Re: /tmp change permission to 755

Any sudo scripts or commands? Keep looking. Maybe it was a one time thing, a mishap being in the wrong directory.