1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Rep Power

    File Permissions - apache vhost

    Hello, I am new to Linux and yes I tried to search the net for info on this topic.. I found some, but it was not helpful.

    My question is this:

    I have multiple domains hosted on a linux (Mandrake 9.0) box.

    Each domain has a different user associated with it. FTP is used to upload content. The problem is their websites cannot be seen unless I go in there and do a chown to their files after they have uploaded their content. I have to chown their directory to apache.apache for it to be display in a web browser.. If I dont do that I get a permission denied error.

    Do I need to place each user in the apache group? and what should I set the permissions in each user directory to?

    I tried the <Directory /dir/dir>
    stuff still no go.

    Thank you all for your help.
  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    London, UK
    Rep Power
    Your FTP daemon (you haven't specified which one you're using) may have a default permissions setting which you can set. The default permission for files should be 644 for files and 755 for directories.

    If not, you may find that the FTP clients are uploading the files with wrong permissions. However, I'm not sure what permissions they're uploading the files with to cause this problem. The directory will need to be executable (chmod +x dir_name/). You need to make directories executable so that they can be read from in order for Apache to be able to view their contents, so maybe the directories are being uploaded with permission 644. Most FTP clients are aware of this and use sensible defaults. Some might not.

    Hope this helps.

IMN logo majestic logo threadwatch logo seochat tools logo