Sponsored Content
Top Forums UNIX for Advanced & Expert Users Ownership problem using a CIFS-mounted volume Post 302217794 by same1290 on Wednesday 23rd of July 2008 02:46:05 PM
Old 07-23-2008
Ownership problem using a CIFS-mounted volume

Hello,

I am trying to use a storage service for backing large amounts
(terabytes) of data. The service uses Linux machines and allows
mounting of their disks using the CIFS/SMB protocol.

I do have the option of using rsync directly over the network
without mounting. But in order to automate this process, I do
want to have the remote disk mounted and be able to use cp or
rsync transparently.

The data that needs to be backed up is also on Linux systems. I had
our sys admin set things up on our system so that I can use mount.cifs
command to mount the remote disk like so:

$ mkdir -p /tmp/sam_test3
$ mount.cifs //brick.orgname.org/test3 /tmp/sam_test3 -o
user=test3, uid=sam, gid=swdevelopers, file_mode=0775,
dir_mode=0775

where the remote username (on brick) is 'test3' and my local username
is on our system is 'sam'. By the way, 'test3' is also a member of a
group with the same name 'test3'. That group has w/x permissions on
/tmp/sam_test3.

The mounting command above works fine: After entering my remote user
password, the disk is successfully mounted, but it changes owner and
gid to 'test3'.

The problem is to write to that mounted dir from my local machine on
which I'm logged in as 'sam'. Since I'm not the owner of
/tmp/sam_test3 and I don't belong to the group 'test3', I can't
write to it.

It would seem that the way to solve this would be to add my local
username, 'sam' to the group 'test3' on the remote machine. But this
is what the admin for the remote machine brick told me.

> I think that is going to be UID based, and not name based so adding
> the name will likely not help as the UID between machines is going to
> be different.

Is there anyone with in-depth knowledge of CIFS and the mount.cifs
command who can suggest a way around the ownership permissions
problems.

He also suggested that smbmount doesn't have the same problem.
(If that's true, why not?)

Thank you in advance to whomever can give me some suggestions,

Sam
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Stubborn file ownership problem! Argh!

Hi, I have Apache running well on a Linux server, with Samba installed. I do must of my work in Notepad2 on a Windows box using Samba shares on which I am logged in as a user on the box (non-root). I recently decided to expand into cgi-perl. My /htdocs/cgi-bin directory is already part of a... (0 Replies)
Discussion started by: questor
0 Replies

2. Linux

files ownership/permission problem

all the files and directories in my system are owned by root only.i try to(from root loggin) change the permission on the file but not permitted.can any one help to fix my problem .also while installing any software always error occur like no makefile available (1 Reply)
Discussion started by: jop
1 Replies

3. AIX

CIFS Mount Problem in AIX 5.3 TL12 SP-01-1016

Hi all, We are experiencing below mentioned error on mounting windows Share on AIX 5.3 when we migrate our TL from 8 to TL12-SP01, we also checked the allowed password length for mounting CIFS which is fine(10 characters in our case). On IBM fix central site there is a fix IZ63140 for... (10 Replies)
Discussion started by: m_raheelahmed
10 Replies

4. AIX

I/O speed to CIFS mounted Windows Share

I have an AIX box that mounts a Windows share across subnets. When I try to copy a 100 MB file to it, it copies around 2 MB/s. If I copy to another Windows share on the same subnet it copies around 12 MB/s. All I have is gigabit networks so I would expect it to go well over 12 MB/s, which is the... (8 Replies)
Discussion started by: kah00na
8 Replies

5. Shell Programming and Scripting

Directory / File changes on CIFS share mounted on Red Hat Linux

I have a requirement to copy the changed file on CIFS share mounted on Red Hat Linux to a remote FTP/SFTP server. I tried inotify-tools, but this didn't track the modified files. Has anyone tried incron or any other suggestion? (1 Reply)
Discussion started by: SupeAlok
1 Replies

6. Red Hat

Permissions problem with cifs.mount

hi, I have the following permission problems with cifs.mount : a share on a VNXe (EMC NAS) is accessed by two RHEL 5.9 accounts (authenticated by Active Directory); One account has read+wite permission to the share , the second one has only read permission. Both accounts uses the following... (0 Replies)
Discussion started by: Zarake
0 Replies

7. Solaris

In Solaries 10 how to mount multiple volume on same mounted point

Hi , I am completely stuck and not getting any clue to come out this . So looking for help Q : I have salaries 10 in server with that Dell Equallogic storage connected. in dell Equlalogic in i have 70 TB storage . I created 7 volumes 10 TB each . In Solaries 10 i have syslog server i... (1 Reply)
Discussion started by: Roahn Tiwari
1 Replies

8. Linux

Volume is mounted on two ServiceGuard nodes

Hey! I'm running a HP ServiceGuard cluster with three nodes. One of the packages was moved (not by me) from one node to another a few weeks ago. I just noticed that one of the volume groups is still mounted on the old node. Oops! When I run df, less space is used on the old node than the new. ... (0 Replies)
Discussion started by: tobiasvl
0 Replies

9. AIX

AIX 6.1 : Problem with cifs and win2012.

i want to connect a shared folder on a server w2k12 by cifs "mkcifsmnt", but without sucess, i tried to do the same on w2k3, it works, but both on win7 and w2k12 doesn't work, is there any suggestions about this problem, thks in advance. My aix version is 6.1 (3 Replies)
Discussion started by: aouiti
3 Replies
SMBMOUNT(8)															       SMBMOUNT(8)

NAME
smbmount - mount an smbfs filesystem SYNOPSIS
smbmount service mount-point [ -o options ] DESCRIPTION
smbmount mounts a Linux SMB filesystem. It is usually invoked as mount.smbfs by the mount(8) command when using the "-t smbfs" option. This command only works in Linux, and the kernel must support the smbfs filesystem. Options to smbmount are specified as a comma-separated list of key=value pairs. It is possible to send options other than those listed here, assuming that smbfs supports them. If you get mount failures, check your kernel log for errors on unknown options. smbmount is a daemon. After mounting it keeps running until the mounted smbfs is umounted. It will log things that happen when in daemon mode using the "machine name" smbmount, so typically this output will end up in log.smbmount. The smbmount process may also be called mount.smbfs. NOTE: smbmount calls smbmnt(8) to do the actual mount. You must make sure that smbmnt is in the path so that it can be found. OPTIONS
username=<arg> specifies the username to connect as. If this is not given, then the environment variable USER is used. This option can also take the form "user%password" or "user/workgroup" or "user/workgroup%password" to allow the password and workgroup to be specified as part of the username. password=<arg> specifies the SMB password. If this option is not given then the environment variable PASSWD is used. If it can find no password smbmount will prompt for a passeword, unless the guest option is given. Note that password which contain the arguement delimiter character (i.e. a comma ',') will failed to be parsed correctly on the com- mand line. However, the same password defined in the PASSWD environment variable or a credentials file (see below) will be read cor- rectly. credentials=<filename> specifies a file that contains a username and/or password. The format of the file is: username = <value> password = <value> This is preferred over having passwords in plaintext in a shared file, such as /etc/fstab. Be sure to protect any credentials file properly. netbiosname=<arg> sets the source NetBIOS name. It defaults to the local hostname. uid=<arg> sets the uid that will own all files on the mounted filesystem. It may be specified as either a username or a numeric uid. gid=<arg> sets the gid that will own all files on the mounted filesystem. It may be specified as either a groupname or a numeric gid. port=<arg> sets the remote SMB port number. The default is 139. fmask=<arg> sets the file mask. This determines the permissions that remote files have in the local filesystem. The default is based on the current umask. dmask=<arg> sets the directory mask. This determines the permissions that remote directories have in the local filesystem. The default is based on the current umask. debug=<arg> sets the debug level. This is useful for tracking down SMB connection problems. A suggested value to start with is 4. If set too high there will be a lot of output, possibly hiding the useful output. ip=<arg> sets the destination host or IP address. workgroup=<arg> sets the workgroup on the destination sockopt=<arg> sets the TCP socket options. See the smb.conf socket options option. scope=<arg> sets the NetBIOS scope guest don't prompt for a password ro mount read-only rw mount read-write iocharset=<arg> sets the charset used by the Linux side for codepage to charset translations (NLS). Argument should be the name of a charset, like iso8859-1. (Note: only kernel 2.4.0 or later) codepage=<arg> sets the codepage the server uses. See the iocharset option. Example value cp850. (Note: only kernel 2.4.0 or later) ttl=<arg> how long a directory listing is cached in milliseconds (also affects visibility of file size and date changes). A higher value means that changes on the server take longer to be noticed but it can give better performance on large directories, especially over long distances. Default is 1000ms but something like 10000ms (10 seconds) is probably more reasonable in many cases. (Note: only kernel 2.4.2 or later) ENVIRONMENT VARIABLES
The variable USER may contain the username of the person using the client. This information is used only if the protocol level is high enough to support session-level passwords. The variable can be used to set both username and password by using the format username%pass- word. The variable PASSWD may contain the password of the person using the client. This information is used only if the protocol level is high enough to support session-level passwords. The variable PASSWD_FILE may contain the pathname of a file to read the password from. A single line of input is read and used as the pass- word. BUGS
Passwords and other options containing , can not be handled. For passwords an alternative way of passing them is in a credentials file or in the PASSWD environment. The credentials file does not handle usernames or passwords with leading space. One smbfs bug is important enough to mention here, even if it is a bit misplaced: o Mounts sometimes stop working. This is usually caused by smbmount terminating. Since smbfs needs smbmount to reconnect when the server disconnects, the mount will eventually go dead. An umount/mount normally fixes this. At least 2 ways to trigger this bug are known. Note that the typical response to a bug report is suggestion to try the latest version first. So please try doing that first, and always include which versions you use of relevant software when reporting bugs (minimum: samba, kernel, distribution) SEE ALSO
Documentation/filesystems/smbfs.txt in the linux kernel source tree may contain additional options and information. FreeBSD also has a smbfs, but it is not related to smbmount For Solaris, HP-UX and others you may want to look at smbsh(1) or at other solutions, such as sharity or perhaps replacing the SMB server with a NFS server. AUTHOR
Volker Lendecke, Andrew Tridgell, Michael H. Warfield and others. The current maintainer of smbfs and the userspace tools smbmount, smbumount, and smbmnt is Urban Widmark <URL:mailto:urban@teststa- tion.com>. The SAMBA Mailing list <URL:mailto:samba@samba.org> is the preferred place to ask questions regarding these programs. The conversion of this manpage for Samba 2.2 was performed by Gerald Carter 19 November 2002 SMBMOUNT(8)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy