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.

FTP file permissions using a mac

Discussion in 'General Discussion' started by Snowman30, May 1, 2006.

  1. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I have a client whos using CuteFTP for Mac and is having troubles when he uploads files via FTP

    for some bizarre reason all PHP files are being uploaded as chmod 777 which is no good under phpsuexec

    because hes using a mac it appears theres no simple fast way to highlight and chmod the files en masse

    is there a way i can force all php files to be uploaded as 644 ot 755 max?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You could try playing with the umask setting in /etc/pure-ftpd.conf, however the problem is likely within the FTP client. You can configure many clients to perform chmod on file upload and it could simply be that that needs doing in theirs. Otherwise, advise a change of client perhaps.
     
  3. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Jonathon

    it seems to be Mac related for some reason

    the clients used CaptainFTP and CuteFTP

    I use CuteFTP pro and i cant recreate the problem (but then again im on Nix and windows)

    umask is set to 133:022 and im buggered if id even know where to bein to try and force no files uploaded via FTP to be set to higher than 755
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Thing is 133:022 should do what you want anyway. It's a permissions mask (in octal):

    Files = 133 => chmod value of 644
    Dirs = 022 => chmod value of 755

    With those in place, it still points the finger at the FTP clients, unfortunately.
     
  5. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    hmm thanks

    problem with it is that they had no problem before moving to the new hardware (which has phpsuexec, whereas their old hardware didnt)
     
  6. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    This is to be expected.

    Without phpsuexec enabled, php runs as the nobody user and so be bothered by 0777 permissions.

    With phpsuexec enabled, php runs as the account holder and php scripts must follow cgi rules, with the shortened version being that 0755 permissions are the maximum you should be using.

    It still points to the FTP client - the FTP client is chmodding files to 0777 instead of what they should be.
     
  7. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    the thing that has me stumped is that 2 different FTP programs do the same thing and i know CuteFTP reasonably well as i use it everyday and im not aware of any config settings to specify the chmod of uploaded files in it

    unless its just a mac thing?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Could be. Is there a setting to maintain file permissions when uploading files (some FTP apps do have that)?
     
Loading...

Share This Page