How do I grant myself super access to files/folders?
Here is an output example when I run ls -l
drwx------ 24 user1 user1 4096 Dec 7 21:00 folder1 drwxrwxrwx 6 user1 user1 4096 Apr 18 20:36 folder2 I am able to browse folder2 just fine but not folder1 unless I open my file manager with sudo. Is there a way to somehow grant myself access to everything? It's my system and I want to view all files on the system. I should be able to get into folder1 without having to fire up the file manager using sudo. |
Quote:
|
Quote:
You are able to get into folder2 without any issues because permissions on folder2 is set to 777 which means owner, group and others have got full access to folder2 and anyone can get in. Quote:
As this is your test server or the server on which you are trying to do R&D you have got two options: 1. Setup ACL, which is kind of messy if you are trying to set it up on multiple directories. Basically troubleshooting file permission issues with ACL on will drive you crazy. 2. Give permission to others, I wouldn't suggest giving write permission but just allow browsing. You can do that by executing the following command: Code:
sudo chmod -R 755 folder1 |
You can give folder1 group permission rwx and make the filemanager user a member of that group.
|
The main thing I am actually just trying to do is to backup the folder using rsyinc over ssh to another system but I am getting permission denied messages. User1 is not me.
Sudo chmod -R 755 would work, but not if they keep adding folders here or there. I'd have to do that each and every time I run the backup. Can I run rsync over ssh but use sudo? Will that run sudo on the remote computer too or just locally? ie... sudo rsync -azvr ssh user2@server:/media/files /home/user2/backup Right now I run something like: rsync -azvr ssh user2@server:/media/files /home/user2/backup But what happens from time to time is users ask me to take a look at their files for help here or there and it's a pain to pop up a sudo file manager, so I'm hoping to find a way around it. |
All times are GMT -5. The time now is 11:45 PM. |