I wish to copy the /var/lib/mysql folder to a different folder in a job as jenkins, via this shell command:
cp -R /var/lib/mysql ~/Container/feature
But it gives permission denied when the job runs.
I have set jenkins user to mysql group.
In addition I gave /var/lib/mysql and sub-directories rwx-r-x-r-x, but whenever a new table is created by Mysql, it only has rwx-r-x--- permisssion, so that next time that specific table is not copied. It's giving a Permission Denied error.
Is there any way to solve this problem ?