?

Log in

sudo for write access to a single file - Linux Help Desk [entries|archive|friends|userinfo]
linuxsupport

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

sudo for write access to a single file [Jan. 4th, 2010|09:27 am]
linuxsupport

linuxsupport

[pkbarbiedoll]
Can sudo be used to grant write access to a single file? I've granted sudoer access to a script, but this script writes to a log file. Currently the log file is chmod 644, and sudoers are unable to use the script due to incorrect permissions on the log file. I could chmod 666 to everyone, but that would be problematic.
LinkReply

Comments:
From: oholiab
2010-01-06 10:36 pm (UTC)
chown the file to whatever group sudoers is and make it 664.

Traditionally it's wheel I think, but that might be distro specific
(Reply) (Thread)