Domanda

I use automysqlbackup to backup my mysql database.

The problem is I can only run this program using sudo automysqlbackup. This program dumps the backup into my folder /home/user/backup but theses files are owned by root and when I connect via ftp to this folder I cannot delete or read them.

Is it possible that any files created by root in the folder /home/user/backup can be read/write/deleted by user "user" ?

Or is there a way I can run the automysqlbackup with user "user" ?

È stato utile?

Soluzione

Couldn't write a bash script, which calls the backup and then changes the permissions with chmod ?

Altri suggerimenti

For the first question : you can use SUID, for example :

chmod 4750 file1.txt

Here in 4750, 4 indicates SUID bit set, 7 for full permissions for owner, 5 for read and execute permissions for group, and no permissions for others.

For example, you can chmod your command, and your user may execute your backup command

For the second question, you can upgrade the user rights with the file /etc/sudoers.

If you need more help, say me.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top