- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Can not access into the mounted point
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2011 11:22 PM
08-30-2011 11:22 PM
Can not access into the mounted point
Hi All,
I have encountered a problem of accsssing the dirs which is mounted in a chroot environment with non-root user.
In a chroot environment , i mount
# ll -d /test_dir/
drwxr-xr-x 2 root sys 96 Aug 30 23:30 /test_dir/
# chmod 700 /test_dir/
# mount -F vxfs /dev/vg00/lvol10 /test_dir/
/dev/vg00/lvol10 114688 2165 105498 2% /test_dir
and then i su to a not-root user,
# cd /test_dir/
sh: /test_dir/: Permission denied.
I will encounter the permission denied problem.
But in non-chroot environment, i will not get this error.
Could anyone give a help about this?
Thanks in advance!
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2011 01:02 AM
08-31-2011 01:02 AM
Re: Can not access into the mounted point
># chmod 700 /test_dir/
I thought this would be a problem. I.e. someone does look at the permissions under the mount point, when doing operations on what's mounted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2011 04:00 AM
08-31-2011 04:00 AM
Re: Can not access into the mounted point
Hi Kevin:
First "mount":
# mount -F vxfs /dev/vg00/lvol10 /test_dir/
and second "chmod":
# chmod 700 /test_dir/
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2011 10:53 PM
08-31-2011 10:53 PM
Re: Can not access into the mounted point
When using the chmod command after the mount operation, then
i will got the same error.
BTW
# ll -d /test_glo/
drwx------ 2 root sys 96 Aug 31 00:42 /test_glo/
# mount /dev/vg00/lvol12 /test_glo/
# ll -d /test_glo/
drwxr-xr-x 3 root root 96 Aug 30 23:00 /test_glo/
It seems that the mount operation will change the permission and owner of the dirs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2011 12:29 AM
09-01-2011 12:29 AM
Re: Can not access into the mounted point
There are two directories involved:
- the regular directory /test_glo/ on your root filesystem
- the root directory of the filesystem located on /dev/vg00/lvol12
Before running the mount command, you see the first directory; after mounting, you see the second one. Both directories have independent owner/group/permission attributes.
When you're using a directory as a mount point, the permissions of the directory that is used as a mount point don't usually matter very much; the directory just has to exist. In situations where it's likely that a filesystem might be unmounted while someone tries to use it, I sometimes deliberately leave a zero-length file in the mount point directory before mounting a filesystem on it:
mkdir /mountpoint
touch /mountpoint/Filesystem_not_mounted
chmod 444 /mountpoint/Filesystem_not_mounted
chmod 555 /mountpoint
ll /mountpoint
-r--r--r-- 1 root root 0 Sep 1 08:00 Filesystem_not_mounted
<Now you'll see it...>
mount /dev/vgSOME/lvolOTHER /mountpoint
ll /mountpoint
drwx------ 2 root root 60 Sep 1 08:00 lost+found
<...now you won't!>
Assuming that /dev/vgSOME/lvolOTHER is a freshly-created filesystem, its root directory will only contain the "lost+found" directory. The original /mountpoint directory is hidden when the mount command pastes the root directory of /dev/vgSOME/lvolOTHER over it; the "Filesystem_not_mounted" file will be visible only when the /dev/vgSOME/lvolOTHER is not mounted. The name of the file should give sleepy night-shift operators a quick clue of what's wrong...