Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In the /gondor folder I have backup files from previous system. I created a new user and wanted to give ownership the user to a folder. It seems working, but still the user can't enter to the directory. Here is what I have done:
su to the user and then try each directory separately I.E.
Code:
su edgardo -
cd /mordor
cd mar_27_backup
cd edgardo
confirm exactly where the issue starts first. It maybe that the user doesn't have execute permissions on mordor or mar_27_backup, selinux would usually not interfere with a cd or ls..
Last edited by r3sistance; 04-12-2017 at 04:22 PM.
[root@localhost zillur]# su edgardo -
[edgardo@localhost zillur]$ cd /mordor/
bash: cd: /mordor/: Permission denied
I have just newly installed centos 7. In the /mordor folder I have backup file using rsync from another machine. Now I created a user and gave him the permission using chown. but it is not working. I am not sure what I am missing!! any suggestion?
Now my file system looks like this:
Quote:
[root@localhost zillur]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 14.6T 0 disk
└─sda1 8:1 0 14.6T 0 part
sdb 8:16 0 111.8G 0 disk
├─sdb1 8:17 0 1G 0 part
├─sdb2 8:18 0 1G 0 part /boot
└─sdb3 8:19 0 109.8G 0 part
├─cl00-root 253:0 0 50G 0 lvm /
├─cl00-swap 253:1 0 4G 0 lvm [SWAP]
└─cl00-home 253:2 0 55.8G 0 lvm /home
sdc 8:32 0 10.9T 0 disk
└─sdc1 8:33 0 10.9T 0 part /mordor
sr0 11:0 1 1024M 0 rom
sr1 11:1 1 1024M 0 rom
you seem to be going off on a tangent, the issue is with /mordor right? Other than that mount command, what are you doing with /gondor that suggests it has failed?
The trailing dot indicates other rules apply, ACL's, SE-Linux.
Can you show us a complete listing of / which includes gondor, and show the mount command used to mount sda1 to it, along with the prompt string (i.e. user context) and any messages that result.
Thank you very much for your reply. So how can I give permission to this user and others to use /mordor/mar_27_backup/user directory?
The mount command I used:
Code:
mount /dev/sda1 /gondor/
and it does not give any error message.
Code:
[root@localhost zillur]# ls /
1 boot etc home lib64 mnt opt root sbin sys usr
bin dev gondor lib media mordor proc run srv tmp var
The 'x' in directory listings means the user or group can "traverse", or cross into the directory (for files it means "execute", but you cannot execute a directory - the meaning is different).
To allow all others to cross into some directory and access its contents, it and all parent directories back to / must generally have r-x for user, group and other.
To set this for a given directory, for example /mordor...
[root@localhost zillur]# fdisk -l /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 16000.9 GB, 16000900661248 bytes, 31251759104 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
# Start End Size Type Name
1 2048 31251759070 14.6T Linux filesyste
[root@localhost zillur]#
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.