View previous topic :: View next topic |
Author |
Message |
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Tue Dec 19, 2006 1:07 am Post subject: [solved] CIFS mounted share. designate the owner via FSTAB? |
|
|
I recently setup a file server using ubuntu, and tried mounting the shares via fstab using CIFS, but wasn't able to figure out how to make it so that I am the owner, as opposed to root. So instead I had to use smbmount and a script in the KDE autostart folder to get around this. There has to be a better way to do it though. My problem was that even if I tried to chown the folder in /mnt to have me as the owner, as soon as I mounted (using cli or fstab) the owner went back to root, and when I tried to transfer files, I would get permission denied.
I am sure I am just missing something here with fstab, but could someone help me? I would rather use CIFS as it seems to be faster, and from what I have read SMBFS is being deprecated anyway.
Here is the relevant part of my fstab:
Code: |
/porky/media /mnt/remotemedia cifs defaults,noatime,credentials=/home/tom/auth.txt 0 0
|
and here is what i had working from cli, but with the same problems:
Code: | mount -t cifs //porky/Tombackup /mnt/samba -o credentials=/home/tom/auth.txt
|
Last edited by Zyzzyva100 on Wed Dec 20, 2006 1:37 am; edited 1 time in total |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Tue Dec 19, 2006 1:22 am Post subject: |
|
|
_________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Tue Dec 19, 2006 1:45 am Post subject: |
|
|
Yea, as if I hadn't looked there already. I have yet to be able to interpret all of the options.
Here is what I have tried, but its still not working:
Code: |
mount -t cifs //porky/media /mnt/remotemedia -o othmask=0777,rw,uid=1000,credentials=/home/tom/.auth.txt
|
I also tried this: Code: |
mount -t cifs //porky/media /mnt/remotemedia -o rw,setuid=1000,mode=0777,credentials=/home/tom/.auth.txt
| Still no luck.
I can still create folders, but I don't own them - thus copying over a folder stops as soon as I hit the first file in the folder, and then I have to go and chown the folder. Anybody else with any other insights (besides man, I honestly did read it, I just don't seem to understand it)
Last edited by Zyzzyva100 on Tue Dec 19, 2006 3:54 am; edited 1 time in total |
|
Back to top |
|
|
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Tue Dec 19, 2006 3:53 am Post subject: |
|
|
Any help here would be really appreciated. In some emperical tests I just did, CIFS seems to be about twice as fast as SMBFS (and considering everything on my network is gigabit, its really frustrating to get crappy transfer rates), so I would love to figure this out.
Does anybody else have a CIFS share mounted that they can just drag and drop files/folders to? If so, please just let me know what your fstab looks like, and I will be forever grateful! |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Tue Dec 19, 2006 4:01 am Post subject: |
|
|
Don't know what you're running; the "man mount" I have access to has no options named "othmask" or "setuid".
This works in fstab for me:
Code: | //hostname/sharename /mnt/winbox cifs user,uid=1000,gid=1000,credentials=/path/to/credfile 0 0 |
Not sure if it's necessary but I also have CIFS Extended Atributes (and POSIX ACL's) compiled into the module.
Chris _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Tue Dec 19, 2006 12:26 pm Post subject: |
|
|
Oops, those extra options came from a part of man mount pertaining to the adfs filesystem - I hadn't realized I was into the specific fs options towards the bottom. I tried the code that you had, and it still doesn't work. Using that exact code, when I create a new folder within one of the shares I am still allowed to create the folder, but it is immediately owned by root, group 1000, and I can't write to it. I just can't seem to figure out what isn't going right here. |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Tue Dec 19, 2006 3:24 pm Post subject: |
|
|
What kernel are you running? If it's old download and use some newer cifs code (or upgrade the kernel).
Chris _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Tue Dec 19, 2006 7:54 pm Post subject: |
|
|
2.6.15, although I have another gentoo box here that is .17 I think I could test it out on. There isn't anything server side that needs to be configured differently for cifs is there? You just set everything up for samba, and specify cifs at mounting? |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Tue Dec 19, 2006 8:22 pm Post subject: |
|
|
Zyzzyva100 wrote: | There isn't anything server side that needs to be configured differently for cifs is there? |
No, nothing to change on the Windows end.
Zyzzyva100 wrote: | You just set everything up for samba, and specify cifs at mounting? |
CIFS is not Samba. CIFS is a kernel module. Samba has little to do with it, although the Samba package includes the mount.cifs and umount.cifs helpers that, while useful, are not necessary.
Again I will mention compiling in the cifs extended attributes as well as checking that you have a recent cifs version. If you don't want to upgrade your kernel, download some newer source and use it (wouldn't hurt to read the README included in the source).
Chris _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Tue Dec 19, 2006 9:30 pm Post subject: |
|
|
darkphader wrote: | Zyzzyva100 wrote: | There isn't anything server side that needs to be configured differently for cifs is there? |
No, nothing to change on the Windows end.
Chris |
The server isn't running windows, its running linux (latest version of ubuntu, primarily because I needed a lamp server that I could have up and running in 15 minutes). Thats the frustrating part! Had it been running windows, this might actually be easier. |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1225 Location: Motown
|
Posted: Tue Dec 19, 2006 9:53 pm Post subject: |
|
|
Zyzzyva100 wrote: | The server isn't running windows, its running linux |
Then you're using the wrong tools. There's no good reason that I know of to use make 2 'nix boxes emulate Windows just to share data. Use NFS or SSH (SCP/FISH, etc.).
Chris _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
Zyzzyva100 Apprentice
Joined: 08 Aug 2005 Posts: 193
|
Posted: Wed Dec 20, 2006 1:36 am Post subject: |
|
|
Yea, I should have tried NFS earlier. I was trying samba/cifs initially because the sever serves to a mac and a streaming media set top box as well. So I can just leave what I have already setup in place for those, and use NFS for the desktops to connect to the shares.
As it turns out, I was definitely trying to use a hammer on a screw, NFS is quite possibly the best thing since sliced bread. I can't believe how easy it was to setup, and now I am getting transfer speeds approaching 50 MB/s, and my switch doesn't even support jumbo frames!
For anything who is interested, here is the gentoo wiki config guide for NFS:
http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS |
|
Back to top |
|
|
|