Mar 22, 2005 #1 Mag0007 MIS Feb 15, 2005 829 US How can I make sure a certain directory (/var/important, /usr/bin, etc..etc..) are only writable by root? I need to know the "find" syntax for it, I have been using google, but no luck.
How can I make sure a certain directory (/var/important, /usr/bin, etc..etc..) are only writable by root? I need to know the "find" syntax for it, I have been using google, but no luck.
Mar 22, 2005 #2 Chacalinc Vendor Sep 2, 2003 2,043 US ls -ld to the directory, permisions must be: [tt]drwx------ root root some_date /var/important[/tt] Cheers. Upvote 0 Downvote
ls -ld to the directory, permisions must be: [tt]drwx------ root root some_date /var/important[/tt] Cheers.
Mar 22, 2005 1 #3 PHV MIS Nov 8, 2002 53,708 FR A starting point (in ksh): [ -z "$(find /path/to/dir -prune -user 0 -a ! \( -perm -020 -o -perm -002 \))" ] && echo "WARNING" Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
A starting point (in ksh): [ -z "$(find /path/to/dir -prune -user 0 -a ! \( -perm -020 -o -perm -002 \))" ] && echo "WARNING" Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
Mar 26, 2005 #4 hfaix MIS Nov 25, 2003 596 US chmod 755 on the directories you want only writeable by root. Users will most likely need access to /usr/bin so keep this as a 5 not a 0. Please explain what you want the find syntax for? Upvote 0 Downvote
chmod 755 on the directories you want only writeable by root. Users will most likely need access to /usr/bin so keep this as a 5 not a 0. Please explain what you want the find syntax for?