Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
We have a cifs share mounted on the linux server with the user as below
mount -t cifs /tmp/data /xxx/xxx/data -o user=tobhia,password=welcome123,domain=xxxx
How can i check if the user "tobhia" has access to the folder "data" ?
Earlier we dont have access to the subfolders under cifs share(which has already mounted) now has access to the subfolders. Should we remount it again to access the subfolders as user tobhia?
mount -t cifs /tmp/data /xxx/xxx/data -o user=tobhia,password=welcome123,domain=xxxx
This doesn't look correct. There should be a double slash somewhere, perhaps //tmp/data?
Quote:
How can i check if the user "tobhia" has access to the folder "data" ?
I wonder if I understand your problem, but this tells you if tobhia has read access to that directory:
Code:
su tobhia -c "ls /xxx/xxx/data"
For write access, use touch.
Quote:
Earlier we dont have access to the subfolders under cifs share(which has already mounted) now has access to the subfolders. Should we remount it again to access the subfolders as user tobhia?
I don't know why you didn't have access earlier, and it's not clear to me which problem you want to solve by remounting. Can you rephrase the question?
Does not matter if option are before or after the //remote/share /mount/dir. user is the username used to access the remote share and not necessarily the same as on the local system. The best way to know if the username has access to a share is to verify their permissions on the remote computer.
Does not matter if option are before or after the //remote/share /mount/dir. user is the username used to access the remote share and not necessarily the same as on the local system. The best way to know if the username has access to a share is to verify their permissions on the remote computer.
When i try to mount the share i get the below error. There is an entry in the fstab
Code:
mount -t cifs //tmp/data/ /xxx/xxx/data -o user=thobia,password=welcome123,domain=domain
Couldn't chdir to /xxx/xxx/data: No such file or directory
This doesn't look correct. There should be a double slash somewhere, perhaps //tmp/data?
sorry doubleslash is missed
I wonder if I understand your problem, but this tells you if tobhia has read access to that directory:
Code:
su tobhia -c "ls /xxx/xxx/data"
For write access, use touch.
unfortunately touch access doesnot work. I always have permission denied.
I don't know why you didn't have access earlier, and it's not clear to me which problem you want to solve by remounting. Can you rephrase the question?
This share is from remote location and we are just mounting it to access it. Earlier we had access only to the parent folder. But now we also got access to the subfolders.
//remote/share -> remote is a host name or an ip, share is the name of the samba share (which you want to access from your linux box).
/tmp/data most probably your mount point, that is not a share, but a local directory.
in fstab the first column is the remote share and the second one is the mount point. I think you mixed it.
//tmp would be the remote computer hostname which does not look correct and why both berndbausch and I question the syntax of your command. Again the device or remote computer/share needs to be first. I assume that /xxx/xxx is the remote computer which is why you obfuscated the information.
//remote/share -> remote is a host name or an ip, share is the name of the samba share (which you want to access from your linux box).
/tmp/data most probably your mount point, that is not a share, but a local directory.
in fstab the first column is the remote share and the second one is the mount point. I think you mixed it.
not really. I mean you need to check if the host name is tmp, the share name is data and the local mount point is /xxx/xxx/data.
From my side it is ok, but I'm not sure if that was correct. You need to check and decide.
//tmp would be the remote computer hostname which does not look correct and why both berndbausch and I question the syntax of your command. Again the device or remote computer/share needs to be first. I assume that /xxx/xxx is the remote computer which is why you obfuscated the information.
I have some mount issues now when i use[code] "mount /xxxx/xxxx/xxxx/share"
I get error "Host is down"
When I use [code]mount -t cifs //remotehostname/share/ /xxxx/xxxx/xxxx/share -o user=username,password=passwd,domain=domain,noserverino,_netdev,vers=2.0
I get "Couldn't chdir to /xxxx/xxxx/xxxx/share: No such file or directory"
Earlier it was working fine. I have requested for permissions for the subfolders on the remote cifs share
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.