Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-14-2012, 01:29 AM
|
#1
|
Member
Registered: Aug 2012
Posts: 142
Rep: 
|
I done chown for a directory but i haven't permission to go in it !!!
I have below problem:
root@UBUNTU-32bit:~# chown -v lfs /mnt/lfs/tools
ownership of `/mnt/lfs/tools' retained as lfs
root@UBUNTU-32bit:~# chown -v lfs /mnt/lfs/tools/build
ownership of `/mnt/lfs/tools/build' retained as lfs
root@UBUNTU-32bit:~# chown -v lfs /mnt/lfs/tools/build
ownership of `/mnt/lfs/tools/build' retained as lfs
root@UBUNTU-32bit:~# su - lfs
lfs@UBUNTU-32bit:~$ cd /mnt/lfs/tools
bash: cd: /mnt/lfs/tools: Permission denied
lfs@UBUNTU-32bit:~$ cd /mnt/lfs/tools/build
bash: cd: /mnt/lfs/tools/build: Permission denied
lfs@UBUNTU-32bit:~$
why I haven't permission ?!!!!
|
|
|
08-14-2012, 01:46 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
What is the filesystem used that is mounted on /mnt/lfs/? Is it mounted read only, or a foreign filesystem such as fat32? If the filesystem is corrupt, the kernel will change access to read only to prevent further corruption.
What does `ls -d /mnt/lfs/ /mnt/lfs/tools' show for the ownership and permissions? If root is denied x access to /mnt/lfs/ then it can't enter to change /mnt/lfs/tools/.
Last edited by jschiwal; 08-14-2012 at 01:52 AM.
|
|
|
08-14-2012, 01:59 AM
|
#3
|
Member
Registered: Aug 2012
Posts: 142
Original Poster
Rep: 
|
file system is : /dev/sdb1 Type: ext4 mount point : /mnt/lfs
and
root@UBUNTU-32bit:/home/user# ls -d /mnt/lfs/ /mnt/lfs/tools
/mnt/lfs/ /mnt/lfs/tools
root@UBUNTU-32bit:/home/user#
I change mount point of this file system manually in fstab ( I add this new partition to fstab) and change /etc/mtab file from
"/dev/sdb1 /media/new Volume\040Volume ext4 rw,nosuid,nodev,uhelper=udisks 0 0
gvfs-fuse-daemon /root/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev 0 0
/dev/sdb1 /mnt/lfs ext4 rw 0 0" to " /dev/sdb1 /mnt/lfs\040Volume ext4 rw,nosuid,nodev,uhelper=udisks 0 0
gvfs-fuse-daemon /root/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev 0 0
/dev/sdb1 /mnt/lfs ext4 rw 0 0"
maybe problem is from these changes !!!!!
Last edited by k84834; 08-14-2012 at 02:27 AM.
|
|
|
08-14-2012, 02:33 AM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Sorry, use `ls -ld' for the long listing.
Also use the `mount' command to list how the partition is mounted. Or check /etc/mtab.
You don't edit mtab. It is updated by the kernel to list how filesystems are mounted.
Last edited by jschiwal; 08-14-2012 at 02:35 AM.
|
|
|
08-14-2012, 02:41 AM
|
#5
|
Member
Registered: Aug 2012
Posts: 142
Original Poster
Rep: 
|
root@UBUNTU-32bit:/# ls -ld /mnt/lfs/ /mnt/lfs/tools
drwx------ 3 user user 4096 Aug 13 11:57 /mnt/lfs/
drwxr-xr-x 5 lfs root 4096 Aug 13 14:15 /mnt/lfs/tools
root@UBUNTU-32bit:/#
root@UBUNTU-32bit:/etc# mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/user/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=user)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sdb1 on /mnt/lfs type ext4 (rw)
root@UBUNTU-32bit:/etc#
Last edited by k84834; 08-14-2012 at 02:43 AM.
|
|
|
08-15-2012, 08:06 AM
|
#6
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
The owner of /mnt/lfs/tools is already lfs.
The verbose option is simply telling you there was no change.
The owner:group of /mnt/lfs is user:user. The permissions are rwx------. So the lfs user can't enter lfs.
|
|
|
08-15-2012, 11:50 AM
|
#7
|
Member
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587
Rep:
|
You might want to change the owner of the mount point to lfs as well, and the permissions too
Code:
chown -v lfs /mnt/lfs
chmod 755 /mnt/lfs
|
|
|
08-18-2012, 12:02 AM
|
#8
|
Member
Registered: Aug 2012
Posts: 142
Original Poster
Rep: 
|
thank you every body for good replies 
|
|
|
All times are GMT -5. The time now is 09:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|