You are not logged in.

#1 2019-02-25 16:36:38

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 198
Website

Using chattr to solve my directory permissions issue

Hi there everyone!

I host some domains on a server using ISPConfig. The FTP folders are set up like this

root <== Viewable, not writable
|-- web <== Writable
|-- home <==Writable

And I need to back up the entire contents of both web and home. The problem I'm having is that although I can log into root in my FTP app and see the contents, when I try to use root as the directory in MyRepono, I'm told that the API is not permitted to access this directory, most likely because the server file permissions prevent the API from accessing this directory.

So I talked to the guys on the ISPConfig forums and they stated I needed to remove the immutable flag on that directory, so that's what I did:

chattr -i /var/www/clients/client1/web1

lsattr: Operation not supported While reading flags on client1/chloestudley.com
--------------e---- client1/web1

But when I tried to create a folder in web1, it was still refused:

Status: Directory listing successful
Status: Creating directory '/new'...
Command: MKD new
Response: 550 Can't create directory: Permission denied

I've checked the ownership of the folders and I don't see a problem there:

drwxr-xr-x 10 root root    4096 Dec 21 23:41 web1
drwxr-xr-x 10 root root    4096 Dec 22 01:14 web2
drwxr-xr-x 10 root root    4096 Dec 23 14:33 web3
drwxr-xr-x 11 web4 client1 4096 Jan  3 00:45 web4
drwxr-xr-x 11 root root    4096 Feb  5 23:58 web5
drwxr-xr-x 12 web6 client1 4096 Feb  9 00:14 web6
root@server1:/var/www/clients/client1# cd web1 && ls -la
total 40
drwxr-xr-x 10 root root    4096 Dec 21 23:41 .
drwxr-xr-x  8 root root    4096 Feb  6 14:24 ..
drwxr-xr-x  2 web1 client1 4096 Dec 21 23:41 cgi-bin
drwxr-xr-x  2 root root    4096 Feb 25 00:25 log
drwx--x---  2 web1 client1 4096 Dec 21 23:41 private
drwx------  2 web1 client1 4096 Dec 21 23:41 .ssh
drwxr-xr-x  2 root root    4096 Dec 21 23:41 ssl
drwxrwx---  2 web1 client1 4096 Dec 21 23:41 tmp
drwx--x--x  5 web1 client1 4096 Feb 25 16:04 web
drwx--x---  2 web1 client1 4096 Dec 21 23:41 webdav
root@server1:/var/www/clients/client1/web1#

What else can I do to be able to work in this directory with the web4 user?

Thanks for your time!


Schw.im! A social site with an identity crisis.

Offline

Board footer

Powered by FluxBB