|
|
You should NEVER use 777
I'd be very careful about using the 777 permissions especially for something that you as the administrator or root user might run some day. 755 will instead give users the ability to execute without giving them write permissions. It would be trivial for any user to replace your newreboot binary with a shell script that would do some bad thing (cd /;rm -r *) that when you run as root will be bad. There should be no reason to use 777 for executables - its a bad bad idea. Use 755 instead! or 775 if you have a trusted group of people who need to administer the script. If you go the SUID rout it's an even worse idea as any user can then run the script and any do any evil they wish.
You should NEVER use 777
Cool -- good call. Thanks for the comment.
You should NEVER use 777--Try 555
If you check most executables in /sbin and elsewhere, the permissions are set to 555. This prevents even root from making changes without specifically enabling them.
file permissions and flags
There are several ways root can modify a write-protected file without changing its permissions, such as with output redirection ("echo foo > file") or with a text editor (which may prompt to overwrite read-only permission). |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|