LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   permissions difference between /home/..../folder and /root/folder (http://www.linuxquestions.org/questions/linux-general-1/permissions-difference-between-home-folder-and-root-folder-345509/)

darkleaf 07-21-2005 05:04 PM

permissions difference between /home/..../folder and /root/folder
 
I have a folder that I want to use for my user account though I want it to be somewhere where it's not easily seen or opened through rox if I forget to lock my screen when I'm away.

Now I had this working properly in /root. I had a folder in there that was owned by my user account. I could only get into if I got the address right at once (so no cd and ls in /root which had access denied). But my / isn't very big so I'm kind of running out of space if I don't regularly clean apt so I wanted it to move to my /home which is on a different partition. I just created /home/user owned by root and made a folder in there which was owned by my user again. Though now I can't get into it from my user account. Are there different rules in /home or is there something I'm missing in the permissions?

cdhgee 07-21-2005 05:13 PM

I would expect /home to have permissions drwxr-xr-x and be owned by root - so if you've created a directory beneath that it will have inherited its permissions from /home. Use chown and chgrp to change the owner and group, and if necessary chmod to adjust the permissions.

Before you do this though - an observation. No matter where you put your home directory, someone will always be able to find it by issuing the command

Code:

cd ~user
or while logged in as you:

Code:

cd
So instead, why not look at getting Gnome, KDE or whichever window manager you use to automatically lock after a set period of inactivity?

darkleaf 07-21-2005 05:17 PM

Yes I know that you can find my home directory like that. That was my main problem in keeping people out as it's simply run rox and then they can see hidden files as well. So it's just a single folder which I don't want in my /home

Going to try now if those permissions work :)

darkleaf 07-21-2005 05:23 PM

Thanks it works. Turns out to be that other and group need x in the list. This made it work: drwx--x--x root root


All times are GMT -5. The time now is 11:20 PM.