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.
Showing posts with label Mac OSX sudo php apache terminal window setuid root apple etc usr. Show all posts
Showing posts with label Mac OSX sudo php apache terminal window setuid root apple etc usr. Show all posts
Saturday, March 20, 2010
Subscribe to:
Posts (Atom)