Admin backup on WebDAV/ownCloud

edvanleeuwen

Verified User
Joined
Nov 18, 2013
Messages
155
I am trying to use WebDAV attached to a remote server to store my admin backups. The server uses software based on ownCloud (Transip / STACK).

I have set up a mount point to the server from my VPS to the remote server. User/group is admin/admin.

Before I backup, the rights are rwx for averybody:

Code:
drwxrwxrwx  2 admin admin  752 Jan  2 10:15 backup

When I run the backup, I get the following message:

Code:
Copy error: /home/xxx/imap/xxx.xx/webmaster: <b>Parent directory does not allow write, or one of the directories didn't allow search (execution) permission</b>
 Unable to create the directory /home/admin/stack/backup/xxx/backup/xxx.xx/email/data/imap/webmaster/Maildir

Afterwards the permissions have been changed:

Code:
drwx--x--x  2 admin admin  720 Jan  2 10:16 backup

Can I solve this by using the proper settings in WebDAV or is this something DA does?
 
I'm using Stack everyday to store my backups, so it certainly is possible. I have DirectAdmin running on a server with Ubuntu 14.04 LTS.

I assume you installed davfs2? And added the right Stack-credentials in the secrets file?

I mount Stack in /etc/fstab this way:
Code:
https://xxxxxxxxxx.stackstorage.com/remote.php/webdav/ /media/stack davfs _netdev,rw,user,file_mode=0640,dir_mode=0755 0 0

My stack-folder is assigned to root:
Code:
drwxr-xr-x 6 root root 216 jan 24 06:28 stack
 
Thanks for your reply.

I have different mount settings, so I am going to try yours:

I mount Stack in /etc/fstab this way:
Code:
https://xxxxxxxxxx.stackstorage.com/remote.php/webdav/ /media/stack davfs _netdev,rw,user,file_mode=0640,dir_mode=0755 0 0
 
The settings for the mount point given by ZipperZapper (thanks!) do the trick. So follow the Stack manual, but use the fstab entry given above.

I use this only for the admin backup. For the application backups, I have entered a new location in Installatron to go directly to Stack as a webdav. Both are working fine now. The only thing I have not tested yet is to restore from Stack.
 
Since a few days the stack connection with my Debian 7.0 server has issues. When I try to connect to it it tells me

Code:
/sbin/mount.davfs: warning: the server does not support locks

Do one of you know what is going on?
 
Hey All,

So I'm also trying to make this mount to make directadmin backups to my Stack.

It all already starts with the next error:
Code:
/sbin/mount.davfs: Warning: can't write entry into mtab, but will mount the file system anyway

then accours:

Code:
Error copying ./data/users/xxx/bandwidth.tally to /home/admin/stack/Backups/xx/xx/backup/bandwidth.tally : Unable to rename /home/admin/stack/Backups/week-4/xxx/backup/bandwidth.tallyhWgEID to /home/admin/stack/Backups/xx/xx/backup/bandwidth.tally: Permission denied

Error copying /home/xxx/.shadow to /home/admin/stack/Backups/week-4/xx/backup/.shadow : Unable to rename /home/admin/stack/Backups/week-4/xx/backup/.shadowtu6F5r to /home/admin/stack/Backups/week-4/xxx/backup/.shadow: Permission denied

Error copying ./data/users/xxx/history to /home/admin/stack/Backups/week-4/xx/backup/history : Unable to rename /home/admin/stack/Backups/week-4/xx/backup/history/2016-08.logMpjgSm to /home/admin/stack/Backups/week-4/xxx/backup/history/2016-08.log: Permission denied
Unable to open /home/admin/stack/Backups/week-4/xxx/backup/history/2016-09.logBcpH8Q for writing

Error writing /home/admin/stack/Backups/week-4/xx/backup/xxx.com/domain.conf to insert local_domain & private_html_is_link: Unable to stat /home/admin/stack/Backups/week-4/xxx/backup/xxx.com/domain.conf.temp for filesize after write
ConfigFile::removeFile(/home/admin/stack/Backups/week-4/xxx/backup/xxx.com/domain.conf) filename does not match

Could not read /home/admin/stack/Backups/week-4/xxx/backup as <user>
Info as root: /home/admin/stack/Backups/week-4/xxx/backup: <user>:<group> drwx------, running as root:root
<21:19:29>

(user, group and xxx changed)

What am I doing wrong here?
Can someone hint me in the right direction?

Greetz,
 
Hello,

Though the question hardly related to Directadmin... you'd have more chances to get a help here if you show how you mount the Stack-drive. As it seems you've the issue with mounting the drive.

And what you see with

Code:
cat /proc/mounts
?

Code:
df -h
?
 
I am (again) struggling to get this to work. I have tried several options, but none seem to work.

The error can be one of the following.

1.
If I mount as admin

Code:
https://xxx/remote.php/webdav/ /mnt/stack davfs _netdev,rw,uid=admin,gid=admin,file_mode=664,dir_mode=775 0 0

I get

Code:
Error copying ... Permission denied
...
Could not read /mnt/stack/backup/s1/2017-08-19/mywebuser/backup as mywebuser
Info as root: /mnt/stack/backup/s1/2017-08-19/mywebuser/backup: 'mywebuser:mywebuser' drwx------, running as root:root
...

2.
If I mount as root and set the sticky bit

Code:
https://xxx/remote.php/webdav/ /mnt/stack davfs _netdev,rw,user,file_mode=0664,dir_mode=0775 0 0

I get

Code:
Unable to create backup directory (uid=admin): /mnt/stack/backup/s2/2017-08-19 : <b>Parent directory does not allow write, or one of the directories didn't allow search (execution) permission</b>

Anyone have any clue what parameters I should use?
 
I simply mount it with:

Code:
/bin/mount -t davfs ${URL} ${LOCAL_DIR};

where

${URL} - url of a stack drive
${LOCAL_DIR} - local directory e.g. /opt/stack
 
I have this same problem with my /backup directory
/dev/sdc /backup ext4 rw,relatime 0 0
drwxr-xr-x 3 root root 4096 Jan 30 18:56 /backup/
/dev/sdc 880G 52G 783G 7% /backup
 
Last edited:
Not related to webdav, but related to the restriction of admin to write on /backup
Unable to create backup directory (uid=admin): /backup/2024-02-07: mkdir(/backup/2024-02-07) error: Permission denied
 
Back
Top