[ILUG] quick Debian question

Niall O Broin niall at linux.ie
Tue Apr 27 12:19:47 IST 2004


On Tuesday 27 April 2004, Steven.Satelle at aer-rianta.ie (Steven Satelle
(Service Desk)) wrote:

>> I'm on a single-user machine.  I don't want to have to sudo to check
>> a logfile.  Is there a way to override this to 644?
>> 
>> --j.
>
>edit /etc/profile
>The last line should be umask 022
>change that and your done, thats for all profiles. to change it for
yourself
>add the command 'umask 644' to your .profile

That's not right, I'm afraid. The umask value controls the umask of a
login shell, and has nothing to do with the permissions on log files
(which I imagine is a part of Debian policy). And in order to get
permissions of 644 on files, the umask needed IS 022 (man umask for
explanation).

I don't know if there is a way ov overriding this issue with the logs -
I somehow suspect that there won't be a simple way, and that it is a
matter of Debian policy. Me, I guess I'd set up sudoers so that my
normal login can sudo less with no password, and then alias say LESS or
sless  as "sudo less" - not solving the problem, as such, but working
around it.



Niall



More information about the ILUG mailing list