LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file permissions (https://www.linuxquestions.org/questions/linux-newbie-8/file-permissions-186212/)

sonesay 05-26-2004 04:05 PM

file permissions
 
#I have created this folder as root

/backup/

[root@P1 /]# ls -l
total 209
drwxr-xr-x 5 root root 4096 May 27 01:17 backup

#inside it there are folder 3 folders

[root@P1 /]# ls -l backup
total 12
d-wx------ 2 ninja ninja 4096 May 27 01:17 ninja
drw------- 2 sone sone 4096 May 27 01:27 sone
drw------- 2 sonint99 sonint99 4096 May 27 01:30 sonint99

#I changed ownership of those files to the 3 useraccounts they belong to.
#here is the sonint99 folder. there are 2 compressed files that i created as #root then changed ownership to sonit99.


[root@P1 /]# ls -l backup/sonint99
total 16
-r-x------ 1 sonint99 sonint99 5496 May 27 09:16 ch-backup.tar.gz
-r-x------ 1 sonint99 sonint99 5342 May 27 01:30 pa-backup.tar.gz

#problem 1

[sonint99@P1 /]$ ls -l /backup/sonint99
ls: /backup/sonint99/ch-backup.tar.gz: Permission denied
ls: /backup/sonint99/pa-backup.tar.gz: Permission denied

#problem 2

[sonint99@P1 /]$ cp /backup/sonint99/pa-backup.tar.gz /home/sonint99/
cp: cannot stat `/backup/sonint99/pa-backup.tar.gz': Permission denied

#Does the problem lie with the /backup/ folder permissions? i chmod 777 #to it but still same result when i try and copy or ls the users backup dir.
#any help much appriciated. thanks

david_ross 05-26-2004 04:10 PM

You need to make sure you have exec permissions on directories too.

sonesay 05-26-2004 04:13 PM

ahh thank you. it works now .. i add x to sonint99 folder.

sonesay 05-26-2004 04:20 PM

I have another question but i dont want to start another thread. I want to put a file in the /home/user/ dir so /home/user/link e.g
i want link to be a short cut to /backup/user/ dir. similar to a windows short cut. does it work the same in gui and cmd line mode?

david_ross 05-26-2004 04:22 PM

Yes - you can do something like:
ln -s /backup/user /home/user/backup


All times are GMT -5. The time now is 08:35 AM.