Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 28039  / 3 Years ago, thu, september 30, 2021, 9:12:49

I copied a folder recursively from the /www/ directory to one of my directories under my home directory. Now, every time I want to create a file or a folder in this copied directory, it says permission denied. So, I have to use sudo every time.



The problem is that I can create files/folders in other directories under the home directory, except this one. I tried changing the permission of this directory recursively to 755 but still the same problem.



Can anyone point out what the exact problem I am facing is? And how do I get around this?


More From » 13.10

 Answers
0

The folder, quite obviously, is property of the root user, which is why you have to use sudo in order to interact with the folder. I don't think chown is able to apply permission changes to a folder, so you would have to go for the graphical route, as explained below.



[EDIT] A folders location typically doesn't affect it's permissions level or owner. For example, I could be the owner of a folder sitting in /usr/share/, but root could be the owner of a folder on my desktop. If you're wondering why it is this way, I'd say ask Bell Labs. They started it. :)



(I used Nemo, but the steps are the same for Nautilus)



First, open a terminal and type sudo nautilus (again, I used Nemo, but it's the same procedure), and enter your sudoer's password.



sudo nautilus (in this case, nemo)



When Nautilus opens, navigate to the folder you wish to change permissions on. Depending on what program you use, you may see and "Elevated Privileges" notice. This is to remind the user to be careful with what they do, as root permissions could damage the computer if used the wrong way.



Navigate to the folder desired



Now right click the folder you want to change and choose "Properties" go to the "Permissions" tab, and it should look something like this:



Root permissions on folder



Select the dropdown menu for Owner and Group, and change them from "root" to your username (in my case, ben). It should look like this now:



How it should look



If desired, click "Apply Permissions to Enclosed Files". Then close Nautilus and exit the terminal.


[#27119] Friday, October 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tionverflow

Total Points: 500
Total Questions: 115
Total Answers: 120

Location: Northern Ireland
Member since Mon, Nov 14, 2022
1 Year ago
;