1834087 Members
2272 Online
110063 Solutions
New Discussion

Permissions on SCHEDLOCK

 
SOLVED
Go to solution
David Lodge
Trusted Contributor

Permissions on SCHEDLOCK

I've noticed that the file SCHEDLOCK has permissions 666 which seem to be applied whenever lpsched is started (umask is set to 027)...

This seems to be a bit of a permissions bug (as lpsched, lpshut should only be run by root anyway!) Does anybody know for certain whether this is designed in, or just sloppy permissions?

thanks

dave
4 REPLIES 4
Paula J Frazer-Campbell
Honored Contributor

Re: Permissions on SCHEDLOCK

Hi David

The 666 permission allows all users the ability to lock out a printer whilst they are printing on it - so a rw-rw-rw- is required to allow them to do it.

Paula
If you can spell SysAdmin then you is one - anon
Alex Glennie
Honored Contributor
Solution

Re: Permissions on SCHEDLOCK

It's a known feature :

The schedlock file is created when the lp scheduler is started and removed when the scheduler is stopped. Apparently the permissions are set to 666 by default, irrespective of the umask for root and/or
lp.

fyi perms of 0644 for the owner lp should be sufficent.

Is the permission setting for SCHEDLOCK hard coded in the lpsched(1M) command ?
Yes.

why the permissions do not agree with the
umask ?
This is because umask is also harcoded in lpsched. umask(000);

I don't see this getting fixed immediately but at least you know .......
Paula J Frazer-Campbell
Honored Contributor

Re: Permissions on SCHEDLOCK

Alex

I have been corrected

:-(

Paula
If you can spell SysAdmin then you is one - anon
David Lodge
Trusted Contributor

Re: Permissions on SCHEDLOCK

I thought so - as lp is setuid!

Thanks Alex