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.

Permissions problem with added subdirectories

Discussion in 'Security' started by georgesbasement, May 4, 2009.

  1. georgesbasement

    georgesbasement Registered

    Joined:
    May 4, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel is the interface that my webhost uses. Generally it has worked great for me, as it is relatively easy to learn where the controls are for the minimal stuff that I'm doing with my website.

    Recently that has changed. I'm finding that it has become difficult to predict how the permissions will be set when I upload files (jpg's and subdirectories) to my webhost's server.

    For example, I set up a directory here: http://www.mydomain.com/Directory/
    I did not make it write protected. Then I added an index.htm file and a JPEG image.

    OK so far - Directory has 0755 permissions. Then I added a second Directory under it: http://www.mydomain.com/Directory/Directory and added copies of index.htm andmydomain.jpg. Still OK - the additional Directory also has 755 and the image is 0644. Still OK.

    Then I threw in the monkey wrench. I uploaded AnotherDirectory at the same level as the second Directory, so the listing under http://www.mydomain.com/Directory/ reads "index.htm over Directory over AnotherDirectory." The permissions of AnotherDirectory are 0750, and the permissions of the images in the AnotherDirectory directory are a mix of 0640 and 0644.

    That's bad enough. When I first went through this process, I attempted to change the permissions to 0755 for the directories and 0644 for the images. Some of my changes stuck, and others did not. It did not seem to matter whether I was uploading with gFTP under linux/debian/lenny or with CuteFTP under WinXP - some images and directories were getting the wrong permissions either way.

    "Changing permissions recursively" seems to be troublesome with cPanel. In the "good old days" before some apparently recent changes, I could make a directory under the public_html folder and then password protect it, and then all the subdirectories in that directory would all be accessible, once the user satisfied the username/password challenge at the main password-protected directory. Not so any more - I get constant complaints that some directories or images are inaccessible. The same thing is happening when I set up an unprotected (0755) directory and add directories under it - the permissions ought to be 0755 for directories and 0644 for images and html files, but are 0750 and sometimes 0640 instead.

    How do I avoid this pitfall ? Right now I cannot predict cPanel's behavior.

    Thanks,
    George Langford
    georgesbasement
     
  2. 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
    Are you using Pro-FTPd or Pure-FtpD on the cPanel/WHM server?

    If you are not the server administrator, you may want to contact your hosting provider regarding this. I have not encountered this behavior myself in cPanel/WHM yet.
     
  3. georgesbasement

    georgesbasement Registered

    Joined:
    May 4, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanelDavidG wrote:
    > Are you using Pro-FTPd or Pure-FtpD on the cPanel/WHM server?

    No - CuteFTP and gFTP. The cPanel version is "cPanel X."

    My ISP suggested inquiring here ... InMotionHosting.

    Thanks,
    George Langford
    georgesbasement
     
  4. 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
    If this is a server-side issue rather than an issue resolved just by using a different FTP client, it would probably be best if your hosting provider was asking here directly or put in a support ticket with their cPanel licensing provider.

    Otherwise, if you don't mind being man in the middle, please ask them which FTP software they are using (PureFTPd or PureFTPD) and if they have performed any customizations to any of the configuration files for their FTP client.
     
  5. georgesbasement

    georgesbasement Registered

    Joined:
    May 4, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanelDavidG wrote:
    > Otherwise, if you don't mind being man in the middle, please ask them which FTP software they are using (PureFTPd or PureFTPD) and if they have performed any customizations to any of the configuration files for their FTP client.

    a. I don't mind being in the middle. It's been a problem, apparently only for me.
    b. It's Pure-FTPd, according to the greeting while I'm uploading files today.
    c. I dunno about mod's.

    As an aside, I uploaded a bunch of files to another server (same webhosting site) and did not experience what I've described in my opening post - the destination folder was already password-protected, and I was able to add subdirectories that ended up with the correct 0755 permissions and JPEG's with 0644 permissions.

    Thanks,
    George Langford
    georgsbasement
     
  6. 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
    Just so you know, password protection done via the cPanel interface in no way affects FTP. It can only affect Apache (the web server).

    It sounds like this is a server-specific issue.

    I know InMotion Hosting is one of our Partner NOCs. If they were to submit a ticket directly to us, they'd get a response from our technical analysts very swiftly. You may wish to encourage them to do that if you are unaware of what customizations they have or have not done to their servers.
     
Loading...

Share This Page