Permissions error - cPanel server

Discussion in 'Apache' started by wvccboy, Jun 6, 2009.

  1. #1
    Not sure if this is an Apache issue but I'm guessing it is.

    I made a PHP script and placed it on my server. This script has a function that will create a new file on the server, say a .txt file with information in it. When I go to do anything with that file that is created such as edit it, I get a permission denied from the server.

    For example, FTP returns:

    "Response: 550 Rename/move failure: Permission denied. "

    Any ideas on how to repair this permissions issue?

    Thanks!
     
    wvccboy, Jun 6, 2009 IP
  2. vasyl

    vasyl Peon

    Messages:
    138
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can post ls -l .txt here...

    BTW php creates file belongs to the user apache running under (the most cases). You can use chmod (http://www.php.net/manual/en/function.chmod.php) to change the permissions of the file created
     
    vasyl, Jun 6, 2009 IP
  3. gary4gar

    gary4gar Peon

    Messages:
    496
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you need to setup permissions correctly. simply right right on File via FTP and click on "Change Permissions" or something like that.
     
    gary4gar, Jun 6, 2009 IP
  4. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #4
    So Chmod doesn't come default with a apache/php server?

    Since the permissions is set to apache I can't right click a file and change the permissions. It's denied.
     
    wvccboy, Jun 7, 2009 IP
  5. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #5
    If suPHP and/or Apache suexec are disabled on your web server then you may face this problem.
     
    kailash, Jun 20, 2009 IP