Ubuntu :: When Mounting CIFS Share, App Files Are Owned By Root?
Jul 26, 2011
I'm trying to mount some CIFS shares (NetApp) to my Ubuntu 11.04 desktop (64-bit).I am mounting it as a domain user with admin rights and full control over the share.ter mounting it as root, all the files are owned by root and I can't modify them from my non-root user.Here is how I am mounting the share:
mount -t cifs -o domain=example,username=example-user,password=mypassword //myfiler.example.com/myshare$/mydir /mnt/myshare/
This share is a qtree under a volume with security type set to NTFS. (Although I have also tried security type = Mixed) We don't configure user-level access to shares on the filer, we create directories and lay down permissions on those from the Windows side. (Although I have tried explicitly adding my domain user to the access list for the share)
Following instructions that I received from the Fedora 10 Guide, I recently edited my etc/fstab file so that I could auto mount my Windows share. It worked the first time, but when I rebooted, I noticed an error saying that Linux could not not unmount the cifs shares. Eventually it did reboot, but now I cannot mount the share at all from fstab. When I run the command #mount -a and then #mount, my share is shown to be mounted although I cannot access it and there is no link to it on the desktop like there was the first time it mounted. I basically want my Windows share to be permanently mounted with read/write permissions. My Distro is Fedora Core 10 64 bit. How can I resolve this issue?
I've to make a Windows 2000 share on my Server Linux CentOS 5.1 with all the updates installed with yum. I've a directory on a Windows 2000 that contains some images for a catalogue. I have my internet site on CentOS 5.1 with a Apache - Mysql - PHP web server. I have to mount my directory on a share in /mnt/catalogueimages and made a symbolic link from my /var/www/html/mysite/catimages to this samba share.
This is what I do following your guide a this link: [URL] I have placed in my /etc/fstab this line: //SERVER/C/Catalogue /mnt/catalogueimages cifs user,username=Administrator,password=,uid=apache,gid=apache 0 0 My Windows 2000 server have no password.
After that I made the symbolic link: ln -s /mnt/catalogueimages /var/www/html/mysite/catimages All it's OK.
The problem is that I can't see the images via browser. I have tried also to put some images in the directory /mnt/catalogueimages, deleting the mount point, in order to see if the problem was in apache: the images are visible via browser. Why I don't reach to see the images mounted with samba?
We recently moved to a new home and I am trying to get my home file/print server set up again. Thanks to swerdna's excellent website, I got my server box (just upgraded from 11.0 to 11.2) running Samba and serving my shares over the network, and my "client" machines can access them without a problem.However, I'm not having much luck setting up CIFS mounts on my Linux desktop. I have my all-purpose user added to the Samba auth list (via smbpasswd), and configured my client as swerdna's howto's specify, and I can access the files just find. However, when I try to mount the shares with this command:
Code: mount -t cifs -o username=klein,password=klein //192.168.1.70/sharedmedia /home/zak/SharedMedia/ I get the following error:
I've been trying for a while mounting a EMC NAS share on linux. As far as I know the NAS share behaves just like a regular windows share, so the mount process should be very similar. On the NAS server, the disc "Disc1" is shared, and I need to mount a sub-subfolder of that share. This is my line in /etc/fstab:
I need to mount a windows share on my OpenSUSE 11.3. I get it using the mount.cifs command (by itself or using cifstab), but only root can rw file. I try the uid/gid parameters (also using forceuid) and the file_mode/dir_mode parameters, but I get the same behavior: all files and directory with rwxr-xr-x permissions and root/root (user/group). I read the whole section FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS in man mount.cifs but nothing works.
When i installed ubuntu. I made a seperate partition so that i could copy an ISO image onto it of an up-to-date version of ubuntu. I wanted to then boot the ISO up so i could install the version that way.I've already tried doing it through the update manager but it'll download, almost be done with installing and it freezes on me. so i figured this would be easier. However i do not know how to gain access to the other partition to copy the ISO image.
I have a usb drive that is owned by root with chmod set to -w-r-x for all othersthe system that root existed on crashed and now i'm trying toecover the files on my usbi have the root password and uuid of crashed hdd can i use a program or copy uuid to new system to recover usb?
I want to mount my FAT32 partition automatically on startup. It gets mounted but the problem is that all the files in the FAT32 partition are shown as owned by root. Because of that I can't paste files or write to this partition. This is my fstab file
Code: # /etc/fstab: static file system information. # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # / was on /dev/sda5 during installation
Q: How can I allow my users to mount a cifs share without an entry in fstab in OpenSuse 11.4?
I have an answer myself. Until OpenSuse 11.2 I could mount my samba shares by making mount.cifs and umount.cifs setuid root. Today I installed OpenSuse 11.4. Unfortunately mount.cifs isn't anymore allowed to be setuid due to security concerns. Security is not an issue in my case, so I copied the mount.cifs and umount.cifs from 11.2 to make it work again:
1. Download cifs-mount-3.4.2-220.127.116.11.x86_64.rpm from this repository (I use 64 bit): "http://download.opensuse.org/distribution/11.2/repo/oss/suse/x86_64/" 2. Extract the files mount.cifs and umount.cifs from the rpm and copy them to /sbin 3. Make them setuid root:
Code: linux-y5qw:~ # chmod u+s /sbin/mount.cifs linux-y5qw:~ # chmod u+s /sbin/umount.cifs 4. Mount your cifs shares as a normal user:
I have a Buffalo Drivestation (model HD-CELU2, 1tb) attached to my network.From my ubuntu desktop I can go to the menu, select "connect to server", put in the ip and share info, and it mounts perfectly.I can open the share and browse eadwrite, but when I try to mount it from a terminal or within fstab, it will still mount, but I cannot see any files that are on the drive. I have about 12gb of data on it, but like I said when I mount it using "mount -t cifs 192.x.x.x/share blah blah blah" I do not see any of the files.If I do a df I can see that the drive has files on it based on the free space available, but if I do an ls nothing shows.
Being a system administrator i came across a statement as "Excluding temporary directories /tmp and /var/tmp, no root owned files should be in world writable directories"While the above statement may look straight forward but how would i check if there are any such directories in the distribution?
I've got a Fedora 10 server with a simple read-only samba share.I'm able to mount and browse the share from a Fedora 12 client, but all directories appear as empty--and I can see on the server that they contain many files. This happens whether I browse using smbclient, or mount using mount.cifs.I've got smb/nmb ports enabled on both the client and server. File permissions on the server look right.The server smb.conf setup:
Yes, I know this is not a good practice, and this is only a short-term solution.I have a server with a web-file-server daemon running internally as root, so the permissions for all files it transfers/creates have a uid/gid of 0:0.This is fine for the daemon, but I would like to manage those files from another workstation - actually a few workstations on a very limited LAN subnet - through NFS. How would it be possible to have users from a certain subnet mount NFS with root read/write abilities?I have seen the anonuid/anongid options (for the /etc/exports file), but I'm not so sure this is the right way to go.
We have a homegrown process that runs on a windows box and produces a csv file. We mount the directory these are output to using autofs/cifs and then process them using a program on our linux database servers.
Is there a way from linux, looking at the cifs share, to tell if the target file is currently in use by a process on the windows box? We are having issues where an incomplete file is being processed occasionally.
I've mucked through and figured out how to mount a windows share. I can access the folders I was looking for, but the windows share was not what I thought it would be. I was looking for the specific shared folder. Instead I got a root level parent directory that included the folder I wanted, and a couple others.
smbclient -L <ipaddress> gives me a parent directory on the root
First question: Can I mount a specific folder within a share? Second question: Could somebody define share? I thought it was the specific shared folder, but that doesn't seem to be the case.
I reinstalled 9.10 yesterday and put the home folder on its own partition. Now it has my home folder as owned by me but all the files in it including Documents are owned by root. I did tell it to change ownership on enclosed files with no luck. So I can't paste my backup files into the Documents folder. I can do GKsudo nautilus but it times out every 15 minutes and I have to restart copying the 67GB of files constantly.
I have a ubuntu lamp server setup and working. The issue I am trying to overcome is the the /var/www directory is owned by root. I am trying to remotely upload content from my development machine using FTP. I don't know what the "right" way to setup remote ftp to the /var/www directory.I don't want to introduce serious security holes but, I do want to be able to just click publish from my dev box. A tutorial would be great if anyone knows of a good one. If not just letting me know what I am supposed to do.
I am trying to edit limits.conf, changed file permissions: sudo chmod limits.conf -rwxrwxrwx
But got this message: "Could not save the file /etc/security/limits.conf. You are trying to save the file on a read-only disk. Please check that you typed the location correctly and try again."
I followed these instructions: "copy - paste this code into terminal gedit $HOME/.gnome2/nautilus-scripts/Open as root copy-paste this text into that file and push 'save' for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do gnome-sudo "gnome-open $uri" & done
now copy-paste this code into terminal chmod +x $HOME/.gnome2/nautilus-scripts/Open as root
Now you can right click on the file you want to edit, select 'scripts' and say 'open as root' to let you modify it". [URL] the right click worked but the file didn't open.
I copied a folder from /media/memory_stick into a folder /opt/openerp/server/bin/addons. Trying to open the copied folder I discovered that it is impossible because it is owned by root.I should like to delete the copied folder.To avoid this ownership I copied the folder in /home/cristian/Downloads and I will copy it with:sudo cp -R folder_name /opt/openerp/server/bin/addonsMaybe in this way the folder will be not more owned by root.I tried already but because in the destination folder already exist one owned by root nothing is happening.
OS views all USB drives as owned by 'root'. My internal 40 Gig drive files appear properly owned by 'glene77is'.My primary backup is a 320 Gig with all files now owned by 'root'.Using the filemanager "Nautilus", all USB external devices must be accessed as 'usb0', 'usb1','usb2', etc.The device names such as 'Alpha', 'Beta','Cappa' are not usably recognized in the menu options.Nautilus shows their names and the usb# as menu options for browing a device directory. Nautilus will open only the usb# menu option. Then sees all files as owned by 'root'.
Hopefully this'll be an easy one (but I wasn't able to find any other posts with the exact same problem).I'm connecting to a large hard drive at work. I can mount perfectly fine. The following is the relevant line in my fstab file:
The problem is that when I try to cd to the correct directory, I get a permission denied error. I don't own the mount point, and there aren't general read/write permissions set. But if I change to superuser, I can access it no problem. I can read, write, make directories, etc. So the problem is with my computer--not the remote one.
Now, if I add the option uid=MYID, I can read and write just fine. The system makes me the owner of the directory on mounting. But that's not what I want--I'm trying to allow multiple users access to this file system. I want there to either be a neutral owner (e.g. root) with others having read/write access, or I want the owner of the mount point to be the user currently logged in.
I have a folder owned by root, I can open it by changing the permissions but then I have to change them back when I'm done, I was wondering if there was a way to use the terminal to open the folder as root without changing the permission on the folder permanently? I am admin and have the sudo password if necessary.
There are a couple of way to mount Samba shares, but I prefer using "autofs" which can mount them on the fly. Use the autofs daemon to have shares automatically mounted on demand. The netfs service (installed by default in Fedora) is not a daemon and can only mount shares on boot, (it can't mount them on demand).
* Install the autofs package:
Code: yum install autofs * Edit /etc/auto.master (the master map file), and comment out all lines (with #). This avoids conflicts with the CDROM (which is handled by Gnome), etc. Save the file. * Create a new file /etc/auto.cifs, with the contents of: Code: #!/bin/bash # $Id$
Just upgraded (my Worksation) to Kernel 2.6.37, but can't mount CIFS shares with password any longer - CIFS shares without password works fine. Tried upgrading Samba (on my server), which holds the shares i'm mounting, to version 3.5.6 - but same result.
Workstation: (Which I just upgraded to 2.6.37) OS: LFS-6.5 (LinuxFromScratch) Kernel: 2.6.37 #1 SMP Sun Jan 9 16:21:11 CET 2011 i686 pentium3 i386 GNU/Linux (Upgraded from 18.104.22.168 where it worked fine) IP: 192.168.65.253 mount: util-linux-ng 2.19
Code: //192.168.0.242/websites /mnt/supercube cifs rw,user=XXX,pass=XXX,iocharset=utf8,file_mode=0777,file_mode=0777,dir_mode=0777,uid=XXX 0 0 But it doesn't auto mount with everything and disconnects whenever I suspend my computer. The only way to get it to mount is with Code: sudo mount -a and it mounts fine with no error.
Did lucid change the way it uses fstab or something? Obviously writing mount -a isn't a huge concern, but it kind of destroys the point of putting it in my fstab.
I tried to create a shortcut to an app I wanted in the plasma dashboard. When I did so, I found that it was owned by root! When I looked at the permissions of the other app icons, they were owned by me, the user.Why did plasma make my newly created app launcher owned by root?I'm so used to the way KDE 3 worked. It was so much simpler. I could click anywhere on that desktop to add shortcuts and they were owned by me, not root. I don't understand why they changed this.
I'm using the IDE Netbeans (text editor) on my /home/michael Ubuntu account. I'm trying to open a file with Netbeans that's owned by root, I can't do this as I expected. So is there a way to run NetBeans as root, or is there a way to give netbeans permission to open/save files owned by root