Backup error permission denied

bash-4.2$ chown asterisk:asterisk /var/spool/asterisk/backup/nfs
chown: changing ownership of â/var/spool/asterisk/backup/nfsâ: Operation not permitted

you need to exit from asterisk user.
Type exit until you see the prompt again (bash)
Then repeat this: chown asterisk:asterisk /var/spool/asterisk/backup/nfs
ls -lah /var/spool/asterisk/backup

if you see that “asterisk” is the new owner, then go and try to run the backup job again.

Same thing.
# chown asterisk:asterisk /var/spool/asterisk/backup/nfs
chown: changing ownership of â/var/spool/asterisk/backup/nfsâ: Operation not permitted
#

you are still with asterisk user.
Type exit again, or exit from SSH and login again as root.

Exit killed the SSH session. Logged back in again and repeated the command. Same result.

Type this: whoami

If you don’t see “root”, don’t run the commands cause it’s going to be useless.
If you are root, then type: chown asterisk:asterisk /var/spool/asterisk/backup/nfs
Then type: ls -lah /var/spool/asterisk/backup

Same as before.

# whoami
root
# chown asterisk:asterisk /var/spool/asterisk/backup/nfs
chown: changing ownership of â/var/spool/asterisk/backup/nfsâ: Operation not permitted
# ls -lah /var/spool/asterisk/backup
total 24K
drwxrwxr-x   6 asterisk asterisk 4.0K Oct 13 08:17 .
drwxrwxr-x. 19 asterisk asterisk 4.0K Oct 13 09:30 ..
drwxrwxr-x   2 asterisk asterisk 4.0K Oct  1 00:00 Default_backup
drwxrwxrwx+  2 root     root     4.0K Oct 13 09:12 nfs
drwxrwxr-x   2 asterisk asterisk 4.0K Oct 12 16:38 PBXBackup
drwxrwxr-x   2 asterisk asterisk 4.0K Aug 23 01:53 PBXtoNAS
#

I think you should try to open a ticket with us, you should be able to change the owner for that directory.

Would this be a paid support ticket on Sangoma or would it be a report on issues.freepbx.org?

likely an acl flag perhaps -i immutable , if the acl package is installed, you can see what the + actually represents

getfacl /var/spool/asterisk/backup

# getfacl /var/spool/asterisk/backup
getfacl: Removing leading '/' from absolute path names
# file: var/spool/asterisk/backup
# owner: asterisk
# group: asterisk
user::rwx
group::rwx
other::r-x

Are you sure it’s a permission issue or is it a connectivity issue? You say the nas has a folder setup for ftp access but you are trying to connect to it using an nfs client using port 21.

You could try setting up the freepbx backup to use an ftp connection I stead of nfs.

I’m only saying it’s a permission problem because that’s what the log is reporting when it fails. The folder is set up for both FTP and as an nfs.

Currently when doing a backup to a different NAS it reports that it backed up successfully. But it’s taking it less than 2 min. to do a total backup including audio files so I have a hard time believing it’s actually backing it up in spite of it reporting success. I don’t have a spare machine laying around to attempt a restore as a way of testing that. I’m a Windows guy (don’t hate me) but when I look at the backup folder it shows the folder as empty.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.