File permissions in Sites folder

When I use my ISP account to host a site and install something like Joomla (a CMS) by uploading it using Transmit or GoLive permissions for directories uploaded default to 755, and are writable by Joomla (for example)

If I upload files to Sites(on another Mac in my network) using GoLive or transmit - the permissions are 750. If I upload the zip file and extract it within terminal, directories are then 755.

Also, directories are not writable even though they're 755 (inlike on my ISP), I need to manually set them to 777. config files for php applications can't be created by the particular application (they can on my ISP), and aren't automatically writeable, I have to create them and set them to 777 to be writeable.

Since I'm completely new to this and not particularly technical, I have no idea why this is happening. Is it specific to the sites folder? Would it be the same if I used the library web documents folder? Is there a way to have this function the same way as it does with my ISP. I have webmin installed, but I get a headache just looking at it.

Thanks!
Chris Hutcheson

G5/2.5 Mac OS X (10.4.6)

Posted on Apr 19, 2006 12:09 PM

Reply
4 replies

Apr 19, 2006 12:39 PM in response to Chris Hutcheson

As the sites folder resides in a home directory then they follow the permissions set by the owner of that directory.

I dont use the Sites folder to serve webpages on my mac mini I have edited the apache config file to specify a directory in /Library/WebServer however I have just checked the sites folder in my home account and the permissions are 755.

When I copy files across my network over AFP to my sites folder on my server they use the same permissions that they were on set to on the mac I sent them from. For example

If I create a folder on my desktop by default it has 755 permissions. If I then zip the folder the resulting zip file by default has 644 permissions. When I copy the zip file to my sites folder it retains the 644 permission, then when I unzip it also retain the the 755 permissions of the original folder.


When I use FTP it follows the similar rules by default transmit uploads files with default permissions of 640 however when I unzip files the unzipped file retains the permissions that were set on it on the computer that sent it.

You can however in the transmit preferences setup what default permissions you want to use on any file that you transfer. You can specify different permissions on different file types. However this will not affect the contents of zipped files they retain the permissions set prior to them being zipped. Y

Apr 19, 2006 5:36 PM in response to Tim Haigh

Thanks very much for your response.

When you say "I dont use the Sites folder to serve webpages on my mac mini I have edited the apache config file to specify a directory in /Library/WebServer..." do you mean that you've set a specific directory within the webserver folder. for example a directory called "bob" would end up as DocumentRoot "/Library/WebServer/Documents/bob"?

Also, I'm still not sure how this relates to my problem with Joomla and the difference between writable directories on my ISP and my mac - would the reslut in the Library/Webserver/Documents/bob example be different (I suppose I should try it and find out!)

Again, thanks for your help.
Cheers
Chris

Apr 20, 2006 1:49 PM in response to Chris Hutcheson

When you say "I dont use the Sites folder to serve webpages on my mac mini I have edited the apache config file to specify a directory in /Library/WebServer..." do you mean that you've set a specific directory within the webserver folder. for example a directory called "bob" would end up as DocumentRoot "/Library/WebServer/Documents/bob"?


No I have configured apache to use /Library/WebServer/bob as the root folder of my website. I don't use /Library/WebServer/Documents at all. I leave that for the apache manual.


Also, I'm still not sure how this relates to my problem with Joomla and the difference between writable directories on my ISP and my mac - would the reslut in the Library/Webserver/Documents/bob example be different (I suppose I should try it and find out!)


I have explained what happens for me, the folders just carry the same permissions that were set on the them prior to copying them. The other solution if you using transmit to transfer your files it to set ther permision defaults in the transmit preferences.

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.

File permissions in Sites folder

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