As soon as i discovered Snow Leopard had built-in PHP and Apache, i immediately tinkered around with config files through the vi editor which i haven't used in 10 years. Being mostly a .NET developer, it was a pain using the terminal window to set permissions on folders and files. I discovered that you could configure your Finder to display hidden folders such as etc and usr by typing this on the terminal window:
defaults write com.apple.finder AppleShowAllFiles -bool true
Seeing all the hidden folders and files on the Finder window made me so excited that the first thing i did was Add myself to have Read/Write permissions on the etc and usr folders. The next thing i did got me into trouble. I clicked on "Apply to Enclosed Items" which cascaded the change to all files and subfolders under etc and usr.
After doing this, i tried restarting Apache by typing this on the terminal window:
sudo /usr/sbin/apachectl restart
and that's when I started seeing this message:
sudo: must be setuid root
I exited the Terminal Window and re-opened it and now I was even getting this error:
login: PAM Error (line 396): System error
login: Could not determine audit condition
[Process completed]
After googling solutions to this problem, i found the fix which was to delete the file
/usr/bin/login and after that I was able to use Terminal window again.
Now going back to the original problem which was finding a fix for sudo: must be setuid root, I went to Utilities -> Disk Utility and selected my Hard drive, Macintosh HD. I clicked Repair Disk Permissions and everything seems to be working again.
Hope this helped anyone who ran into this problem.
Subscribe to:
Post Comments (Atom)
thanks.... you saved my day :)
ReplyDeletethank-you good sir, saved my day as well!
ReplyDeleteThank you !
ReplyDeleteThanks!
ReplyDeleteThanks a lot mate, it worked!
ReplyDeleteThank you!!
ReplyDeleteVery nice .. fwiw, I was able to run repair disk permission without having to delete said login file or logout of terminal and it work
ReplyDeleteWhoohoo! Saved my posterior - thanks much.
ReplyDeleteThank you so much!! Been bothering me for months!
ReplyDeleteThank you sir !
ReplyDeleteThank you so much !! I was dying there !
ReplyDeleteGood man. Sorted my problem out too.
ReplyDeleteWhere is Utilities???
ReplyDeleteYou are a lifesaver.
ReplyDeleteThank you!
ReplyDeleteGrazie mille!
ReplyDeleteLifesaver!
ReplyDeleteThank you, lifesaver
ReplyDelete