Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    686
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default FTP file permissions using a mac

    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. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    686
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    686
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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. #6
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by Snowman30
    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)
    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. #7
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2002
    Posts
    686
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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. #8
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Could be. Is there a setting to maintain file permissions when uploading files (some FTP apps do have that)?
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. ftp file permissions
    By Archness1 in forum New User Questions
    Replies: 1
    Last Post: 03-11-2008, 09:21 AM
  2. FTP (proftp) / MAC Issues
    By hodfords in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-26-2007, 03:41 AM
  3. unable to change file permissions via FTP/SSH and Filemanager
    By dezomat in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-02-2005, 01:55 AM
  4. FTP file permissions resetting back to 644
    By Tux-e-do in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-04-2005, 09:26 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube