Automatically run chown command
macromillion opened this issue · comments
Is your feature request related to a problem? Please describe.
I am always frustrated when I take the time to edit a file in the file explorer built into Puffer panel but when I go to change the file it closes all the work I did and says "unknown error". The problem always turns out to be that the server I am working on doesn't have proper permissions.
Describe the solution you'd like
I want Pufferpanel to automatically detect when they cant access a folder in a server directory and automatically chown
it, preferably the whole server directory. Example: sudo chown pufferpanel 28503042 -R
Describe alternatives you've considered
Manually going into the console and running sudo chown pufferpanel 28503042 -R
, everytime. The point of having the panel, in my opinion, is to minimize the need to use the terminal.
Additional context
Doesn't happen to a lot of people often but there is a select few that may create custom backups as root which changes the permissions and upon restoring a backup the permissions are messed up. It isn't hard to do but there could be two approaches to make this problem a thing of the past.
The problem is that this requires root to do. And PufferPanel does not run as root, so we cannot chown the files.
I would argue that if you are restoring backups, it is already an "edge-case" (because.. if you have to restore, you are already in a problem). But, also, your backups should be preserving the file permissions.
Tar format preserves that information, so if it's not, your backups are not accurate, and should be fixed.