The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

File Permissions problem with new accounts

Discussion in 'General Discussion' started by Worsin, Jan 18, 2008.

  1. Worsin

    Worsin Member

    Joined:
    Jan 16, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Salt Lake City, Utah
    Ok i have had a dedicated server with CPanel and WHM set up so i can do some Joomla hosting for my clients and am having the old file permissions problem. On the install screen for Joomla coarse it says unwritable on all the directories and i know how to change them to the right permissions but that is a temporary fix for a problem i want to avoid for all the future clients i have.

    I have used many hosts that have their servers set up so when any new accounts are added all the file permissions are set up perfect. These typically have Fantastico also.

    Can someone help me understand what settings i need to make on apache/linux or in WHM that will ensure that any new account that i sign up in WHM will have the correct settings including file permissions, while also keeping it secure so that clients can upload their files vie FTP and have all permissions in order?

    some current symptoms i have are:

    • All new FTP files uploaded are unwritable by Joomla
    • All new component and module folders created by Joomla give me no access when i try to save files in those directories using FTP


    Any suggestions are welcomed need help fast!!
     
  2. BlueZebra

    BlueZebra Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    >* All new FTP files uploaded are unwritable by Joomla

    The files uploaded via FTP will be under the ownership of the user and only he is allowed to write. The write permission for 'others' should be set on the directories if you need Joomla (apache, 'nobody' user) to write.


    > * All new component and module folders created by Joomla give me no access when i try to save files in those directories using FTP

    These folders will be under the ownership of 'nobody' and the user won't have permission to modify it.

    A permanent solution for this will be compiling apache as cgi.
     
  3. Worsin

    Worsin Member

    Joined:
    Jan 16, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Salt Lake City, Utah
    Thanks for the response. I don't fully understand the first part as i am somewhat new to this.

    Im sure i can have the people hosting my server compile apache as CGI as you have said.

    Can you explain the first part a little more?

    How would i go about "The write permission for 'others' should be set on the directories if you need Joomla (apache, 'nobody' user) to write."?

    Thanks for your help!
     
  4. BlueZebra

    BlueZebra Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Change the permission of the required folder to 777 and it will work.
     
  5. Worsin

    Worsin Member

    Joined:
    Jan 16, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Salt Lake City, Utah
    I want this to be automatic though when an account is created.

    We are a coaching company for internet business and have found if students have to go in and change permissions after signing up to an account it will be a real hassle.

    We used to use a host called Hostmonster and by default when you signed up to a new account with a fresh domain and uploaded the Joomla! installation package everything was perfect. No changing of any permissions was needed and after installing components directories were accessible.

    Maybe your answering my questing but i am just not understanding?

    on my hostmonster accounts all the directories are set to 775 and the files are set to 644.

    I need this to be the case by default for all accounts that sign up through me.

    Thanks!
     
  6. Worsin

    Worsin Member

    Joined:
    Jan 16, 2008
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Salt Lake City, Utah
    Any more clarification on this?
     
  7. BlueZebra

    BlueZebra Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Its simple, every process in linux is run under the ownership of a user. When php is compiled as apache module it is run under the ownership of http user 'nobody' and all the files uploaded through browser will be under the ownership of 'nobody' and you have to be the root user to change the ownership.

    http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/file-permissions.html will be a good read

    The solution for you will be to ask your host to compile php as cgi so that the files/directories created will be under the ownership of the user (ie your username).
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    SuPHP for PHP (Or SuExec if you are running apps via CGI) will acheive the same thing.
     
Loading...

Share This Page