HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Backup symlink folder permissions wrong (http://www.howtoforge.com/forums/showthread.php?t=53583)

snowfly 30th July 2011 00:33

Backup symlink folder permissions wrong
 
I am unable to change into the /backup folder when connecting via FTP to a site.
Running ISPConfig 3.0.3.3

WinSCP gives error: Can't change directory to backup: Permission Denied.

Directory listing and permissions:
Code:

lrwxrwxrwx  1 root  root        17 Jul 24 00:31 backup -> /var/backup/web26
drwxr-x--x  2 web26 client1000 4096 May 31 15:10 cgi-bin
-rwxr-xr-x  1 root  root        40 Jul 22 11:34 .htpasswd_stats
lrwxrwxrwx  1 web26 client1000  42 May 31 15:10 log -> /var/log/ispconfig/httpd/xxxxx
drwxrwxrwx  2 web26 client1000 4096 Jul 30 00:31 tmp
drwx--x--- 13 web26 client1000 4096 Jul 27 12:43 web

As you can see the backup symlink is owned by root.

Tried the following command, but no difference, still permission denied:
Code:

chown -h web26.client1000 backup
Pure-ftpd is running with VIRTUALCHROOT=true

I can access the 'log' directory fine via FTP (with WinSCP)

It appears the /var/backup folder is set to chmod 750
Changing this to 755 allows backups to be read: (even with root.root owner of backup folder symlink)

Code:

chmod 755 /var/backup
So to get backups working via FTP on all our ISPconfig servers, I have to issue this chmod 755 command on the /var/backup folder.

till 31st July 2011 15:06

The permissions has been changed in 3.0.3.3 so that this sould not happen anymore. Maybe the servers weher originally installed with a version < 3.0.3.3, as this is onyl setup during initial install. Please report this to the bugtracker, I will check that then.

snowfly 29th November 2011 10:14

This problem is happening again, and is happening every day.

Originally multiple servers were setup with version 3.0.3.3, or the version before.
Now they are all on 3.0.4.1

Users with websites on any server are unable to FTP into the /backup folder on each site (symlinked to /var/backup/<website>), getting permission denied error.

On all our servers, the /var/backup currently has these permissions:
drwxr-x--- 170 root root 4096 Nov 27 00:34 backup

To get FTP access working again to the backup folder, I have to do this on each server:
chmod 755 /var/backup

And appears each night the permissions are reverted back?

snowfly 29th November 2011 10:20

UPDATE - Ok I have found there is now a Server Config setting for:
"Backup dir. readable for website FTP users."

I have selected this option for each server, and hope this solves the problem.
As it appears on line 484 of the daily cron script is changing the permissions to 750 (/usr/local/ispconfig/server/cron_daily.php)

blaplace 5th December 2011 08:55

Hi,

I'm new here but would it not rewrite 750 at line 484 on cron_daily.php file and check the option "Backup dir. Readable website for FTP users." is checked in "System-> Server Config" "Server tab" the last checkbox.

I thought I had the same problem and I just searched the php code and it seems to me that this is what the true condition.

This option was perhaps not in previous versions.

It is unfortunate that the customer sees the directory if it has no right to read, it is confusing.

I would be fixed tomorrow, but I do not think too much wrong.

Sorry for my English. :(

till 5th December 2011 09:23

The FTP directory is always readable for shell users, thats why the directory is there. So enabling it for FTP users was well is just a optional feature.


All times are GMT +2. The time now is 14:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.