Setting folder permisions

Hi,

I am currently trying to get MAMPP (Mac, Apache, MySQL, PHP, Pearl) to run.

MySQL is the only module that doesn't start. Now I am not a UNIX pro - but when a programm what's to use a TCP Port / Socket it has to make a .sock file - correct?
MySQL outputs an error in the logfile saying permission denied when mounting Unix Socket.

So I am trying to give /Applications/xampp/ (xampp although it's a mampp) and all subfolders full rights Read&Write.

When right clicking on 'Xampp' --> Get Info I choose 'Ownership & Permissions'. It says ' You can read and write ' (NOTE: I start the mampp as 'sudo su').
When I click on details it says Owner 'Hannes' Access 'R&W' Group 'Hannes' Access 'Read only' Others 'Read only'.

So when I go to change (I unlock first and get the password prompt etc.) the items to R&W for all and even set the group to system and then 'Apply to enclosed items' and I want to lock the settings again - it I guess failes and returns to the original settings and MySQL load failes.

What to do?

Thanks in advance

Johannes

Posted on Sep 12, 2005 6:04 PM

Reply
6 replies

Sep 12, 2005 10:23 PM in response to Johannes Lindenbaum

Johannes,

You're dealling with a couple issues, here. One of them is learning to make the proper "mode" changes, of course. Another one is learning to deal with the fact that Tiger's Finder is just slightly "broken." When we use Getinfo to make changes to Ownership and/or Permissions, the changes we make are not immediately reflected. THis can be quite confusing, because it will appear as if no changes are allowed to be made. We must make any changes we want, ignoring what Getnfo shows us when making the change, then restart the Finder by pressing
b Option-Apple-Esc
and choosing "restart Finder." When theFinder relaunches, our changes will be "registered."

Using chmod in Terminal is really the best way to make changes, but you need to be very careful. For example, it is
b never
a good idea to set a mode of "777" recursively, unless you are absolutely sure that every file in the directory hierarchy should be executable. In fact, I might lean toward saying that using an "absolute mode," like "777," "666," "644," etc., is never a good idea when you are using chmod recursively. In any recursive usage, you should use symbolic mode. This is when you add or subtract a given permission using the form in this example:

chmod -R u+w /Some/File



Using symbolic modes, you could, for example, make executable files and directories (and these items only) executable for everyone like this:

chmod -R a+X /Some/Directory



Notice, in the above example, that I used a capital "X," not a lower case. This is a special feature of chmod that is available only when using symbolic modes that will set the execute bit for all users on any item that is either a directory or a file that is executable by anyone. It will
b not
set the execute bit on a file that is not otherwise executable.

Of course, an important concept to keep in mind here is that normal files (those that are not intended to by "executed") should
b never
have an execute bit set.

Scott

Sep 13, 2005 8:12 AM in response to Johannes Lindenbaum

Hi,

thanks so much for your help.

I have reset the folder permissions. The only UNIX exec files I have to give 777 are the mysql ones - otherwise making the mysql.sock failes and I can't create new tables and databases etc.

The PHP Scripts I have given standard 644 rights.

Since I hardly ever connect my G4 to the internet and I only use it to create code when I am underway - it shouldn't be a too great of hazard.

Thanks again,

Jphannes

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Setting folder permisions

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.