Operating System - HP-UX
1849861 Members
1843 Online
104044 Solutions
New Discussion

ksh : permission denied on mounted directory

 
SOLVED
Go to solution
Brecht De Baets
Frequent Advisor

ksh : permission denied on mounted directory

Hello,

We have the following Unix-version : B.11.23.

I have the following problem. I made a directory /mnt/appserv and
mounted it on a windows server. The line in /etc/fstab to do this is the following :

winoracle:/environments10g /mnt/appserv cifs defaults 0 0

I have mounted this dir as root-user.
The rights on the directory are the following :

drwxrwxrwx 2 root sys 131072 Nov 13 09:54 appserv

When I log in as user 'oracle' and when I try to access this directory I get
the following :
ksh : appserv : permission denied

I am pretty new to Unix.
What am I missing here ?
11 REPLIES 11
Frank de Vries
Respected Contributor

Re: ksh : permission denied on mounted directory

Seems a nfs mount

Permissions on the base filesystem
(that is where the physical files reside)
are not superseded because you mounted
a local directory as root !!

The permission need to be correctly set at
the filesystem before you mounted it.

Also it is worth
checking on Windows how permissions
and access lists are exported.
On unix it is done thru
exportfs -a
based on your /etc/exports file.

Otherwise post the contents of this
equivalent windows file here , so
we can check.

Look before you leap
Yang Qin_1
Honored Contributor

Re: ksh : permission denied on mounted directory

Hi, can you access the shared filesystem on HPUX as root?

Can you describe how you setup this share?


Yang
Brecht De Baets
Frequent Advisor

Re: ksh : permission denied on mounted directory

The permissions on the windows-machine should be ok. I have mounted the same dir on a linux-machine and there I had no problems.

From HP-Unix I can access the directory as root, but not as user 'oracle'.

To mount I did the following :
- I made a new directory : /mnt/appserv and
with chmod I gave it the maximum of
permissions.
- I added a line in /etc/fstab :
'winoracle:/environments10g /mnt/appserv
cifs defaults 0 0'
The pasword for the server is in the file
cifsclient (in /sbin/init.d) :
'/opt/cifsclient/bin/cifslogin -U
username winoracle -P pasword'
- I issued the following : mount -aF cifs
as root-user.
Yang Qin_1
Honored Contributor

Re: ksh : permission denied on mounted directory

It seems you are using samba share. I'm not sure you can manage the file system permission of a Windows samba share by "chmod 777 appserv" for the mount point on HPUX -- you may need to verify the share setup from Windows maybe "root" is configured as a samba user but "oracle" not.


Yang
Sanjay Yugal Kishore Ha
Frequent Advisor

Re: ksh : permission denied on mounted directory

Hello Brecht,

Here's the answere to your query:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1056700

Also instead of using the mount_cifs(1M), can you try the cifsmount and the cifslogin commands?

For CIFS problem, I normally search the responses posted by Eric Raeburn for quick resolutions. :)

HTH,
Sanjay
Dying is the last thing that I will do.
Brecht De Baets
Frequent Advisor

Re: ksh : permission denied on mounted directory

My problem is still not solved !

Sanjay, The link you provided wasn't useful to me because I can actualy mount the directory, but I only have access as the root-user.

Yang, Is there any way to check these samba-users ? I have tried the smbpasswd command to add the oracle-user but I can't execute the command.

Yang Qin_1
Honored Contributor
Solution

Re: ksh : permission denied on mounted directory

Do you have an account "oracle" on winoracle? if you have, does that account has access to appserv?

If you do not have an account for "oracle" on winoracle, you can still try the following:

1. logon as oracle

2. run "cifslogin -s winoracle -P " -- same as what you used in /sbin/init.d

3. try to access /mnt/appserv again


Yang
Brecht De Baets
Frequent Advisor

Re: ksh : permission denied on mounted directory

Thanks Yang,

This is working ! Can you tell me
how to automize this, so that when the
server restarts the mounts are automatically ok. Or do you always have to do this manually ?

Regards,
Brecht
Yang Qin_1
Honored Contributor

Re: ksh : permission denied on mounted directory

Hi, Brecht, if the share is always used by "oracle" you can add the cifslogin command in /sbin/init.d like this:

su - oracle -c "cifslogin -s winoracle -P "

You may still need cifslogin you configured in /sbin/init.d for root because the share will be mounted by root.


Yang
Brecht De Baets
Frequent Advisor

Re: ksh : permission denied on mounted directory

So my problem appears to be solved !!

Thank you,
Brecht
Brecht De Baets
Frequent Advisor

Re: ksh : permission denied on mounted directory

Problem solved by Yang.

Thanks !