sudo mkdir sets root permission

TCRatius

Member
Joined
Aug 30, 2017
Messages
26
Reaction score
30
Credits
0
Hey Everyone,

I'm using the newest release of Linux Mint Cinnamon and when I mkdir from terminal for some reason the directory folder and all subs permissions are; owner and group set to root. This is a pain the arse cause I don't know how to do recursive chmod. I have a basic understanding that it's chmod -R. The stuff that follows just confuses me. Example chmod u=rwx,g=rx,o=r myfile. Thing is I want to set the permissions to the directory. Any help would be appreciated. :rolleyes:

Seems some of the files I create afterwards are not able to be trashed.

$ ls -ld ~/.local/share/Trash/
output
$ drwx------ 4 root root 4096 Nov 3 17:37

Answer was
$ sudo chmod -R 700 ~/.local/share/Trash. I don't really get this and not really sure if I should do this as 7 is god mode.
 
Last edited:


atanere

Well-Known Member
Joined
Apr 6, 2017
Messages
2,787
Reaction score
3,006
Credits
1,738
I'm using Mint Mate, and I'm not getting the same response... or I'm misunderstanding you.

mkdir <dirname> makes the user the owner.
sudo mkdir <dirname> makes root the owner, as it should. (Your title suggests sudo mkdir)

Cheers
 
OP
TCRatius

TCRatius

Member
Joined
Aug 30, 2017
Messages
26
Reaction score
30
Credits
0
gotta love simple solutions. So use to sudoing everything. Looks like your answer fixed it. Cheers tc
 
Last edited:

Members online


Latest posts

Top