• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Cannot delete files...apache user permissions

M

miktor

Guest
Hi, I am running the latest version of Plesk on CentOS 5 on a virtual dedicated server. I uploaded Joomla! CMS and installed it. Everything went fine until I uploaded a new template for it. The site works great, but I am not allowed to change anything in the file I uploaded from the administration panel of Joomla. I look at the properties of all the files through FTP and it has my login as the user but for the files uploaded through the web, it says apache username and group. It does not let me modify it in any way. I have tried through FTP, Plesk file manager and I have had no luck. GoDaddy tech support was no help at all and I need to fix this.

If any extra information is needed for anyone to help me please let me know.
I would appreciate any help.

Thanks,
Mike
 
Ive seen this happen before in other applications like wordpress - basically what Ive seen is that apache will upload the files for you (if you upload them through the website and not from plesk or FTP) and apply the user;group of the web server instead of your user. The fix for this is to use mod_suphp or something similar which will force your site to run as a specific user and then all files written will have the correct user/group so you can then edit and access the files.

Unfortunately this is something that is installed globally on the server and cant be done for just one domain name - you can install it globally and only configure it for one domain name however.

let me know if I did not understand your issue.
 
how would i go about installing/enabling mod_suphp?

thanks in advance
 
Can be done for each domain :)
How to install, see my signature and also Power Toys will help you to manage per DOMAIN mod_suPHP.
 
You can get it directly from http://www.suphp.org/ and install it that way - complete with instructions.

You can also get it in RPM from RPM Forge
http://rpmforge.net/user/packages/mod_suphp/

EDIT:
I forgot to mention the vhost.conf settings for the domain in question. Here is a script I use, but you can just take out the vhost.conf section and use that instead. You would of course need to replace $NEW_DOMAIN_NAME and $NEW_SYSTEM_USER with the real values then.

PHP:
#!/bin/bash

#the path to psa.conf
PSACONF=/etc/psa/psa.conf

#This is the Installation directory where PSA is installed
PSAInstallDir=`grep -i PRODUCT_ROOT_D $PSACONF | awk '{ print $2 }'`

#New File location of the users vhost.conf file
VHOSTLocation=/var/www/vhosts/$NEW_DOMAIN_NAME/conf/vhost.conf

# the domain name will be passed from Plesk via NEW_DOMAIN_NAME
# so write out the conf file

cat  << EOF >> $VHOSTLocation
<Directory /var/www/vhosts/$NEW_DOMAIN_NAME/httpdocs>
    <IfModule mod_php5.c>
        php_value open_basedir "/var/www/vhosts/$NEW_DOMAIN_NAME/httpdocs:/tmp:/var/tmp"
    </IfModule>

    <IfModule sapi_apache2.c>
        <IfModule mod_suphp.c>
            RemoveHandler x-httpd-php
            php_admin_flag engine Off
            suPHP_AddHandler x-httpd-php .php
            suPHP_Engine on
            AddHandler x-httpd-php .php
            suPHP_UserGroup $NEW_SYSTEM_USER psacln
        </IfModule>
    </IfModule>

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
        RewriteRule .* - [F]
    </IfModule>

    <Files php.ini>
        order allow,deny
        deny from all
    </Files>

</Directory>
EOF


$PSAInstallDir/admin/bin/websrvmng -v --reconfigure-vhost --vhost-name=$NEW_DOMAIN_NAME
 
If you have root access to this virtual server then you can log into it and change ownership and group on the file/directory to match the domain ftp user.
 
Sure, you can always do that. But if you dont want to manually do that everytime for every domain on your system (we have thousands for example) then having an automatic system in place would be handy :)
 
and not a lot of people have knowledge of root ... I know a lot of people who do webhosting and don't know what is shell. So all important feature should be in PLESK.
 
Hi. I ran into that problem too. And after days of searching I finally found
this software: Long Path File Tool.

It's GREAT. You can find it here:
www.longpathtool.com
 
Back
Top