1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

User permissions to files

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by anekro, Sep 29, 2011.

  1. anekro

    anekro Guest

    0
     
    Hi, i'm a new spanish Plesk user and i have a question.

    When i upload any web from my old hosting, usually Joomla websites; i have to change file permissions manually, and when i install any extension, it fails.

    How can I setup every domain for every user can upload and change permissions without problems? I read something about Apache's processes owners, but i have no idea.

    Thank You for Your Attemption
     
  2. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    Check in my HOW TO (in signature) the mod_suphp section, this will solve your issues
     
  3. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    You can use php as cgi or fcgi to solve the problem for the user as well just by setting it in website settings in plesk panel.
     
  4. anekro

    anekro Guest

    0
     
    How can I do this?
     
  5. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Navigate to the domain in Plesk > Web Hosting Settings > PHP Support and there you can select Apache module (mod_php), FastCGI or CGI from the dropdown menu.

    You could also upload the extension via FTP (as the domain user) instead of installing it via Joomla (running as the 'apache' user when using mod_php) if you prefer using mod_php, so the extension files will be owned by the FTP user instead of 'apache'. (Performance of mod_php is better than when using CGI or FastCGI.)
     
    Last edited: Oct 14, 2011
  6. anekro

    anekro Guest

    0
     
    Thank you.

    It worked perfectlly :)

    Can I do this for existing domains? Or just for new ones?
     
  7. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Yes, you can do this for any domain new or existing at any time - you can change them back and forth as much as you want, just remember that it takes an apache restart to take effect so it coule be several minutes before the new settings take effect when plesk auto restarts httpd.
     
  8. anekro

    anekro Guest

    0
     
    Done. It worked perfectlly.Thank you very much.

    Another question.
    Before i'd done this, i had somes files Apache's owner and I can't delete it now. Is this possible?
     
  9. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Only apache or root will probably have permissions to delete those files, so you'll have to make sure the delete commands are executed as either one of those user.

    You could for instance log in via SSH and remove the files that way as either root or apache. Or you could create a little PHP script which deletes those files and switch back to mod_php temporarily before running it (so the code will be executed as user 'apache' which also wrote those files). There are probably lots of other options.
     
  10. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    Or you can just chown them to ftpuser:psacln and let the software to do the job.
     
  11. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Yeah, but you'll still need root privileges to run that chown command. :)
     
Loading...