LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2010, 06:54 PM   #1
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Rep: Reputation: 0
Permissions problem with mount


I am pretty mush a newb with Linux and I'm stuck on something. I have two computers. One runs unRaid NAS software which is built on Linux. The other is running XBMC media center which is built on Ubuntu. XBMC has a local folder (/home/kevin/.xbmc/userdata/Thumbnails/) that it stores thumbnails in. I am essentially trying to move this folder to my server, but XBMC needs to see it as local. I started by deleting the old Thumbnails folder and it's contents. I then created an empty Thumbnails folder on XBMC and I also created one on my unRaid comp (192.168.1.20/disk7/xbmc_thumbs/Thumbnails). On the XBMC comp I run:

Code:
chmod 777 Thumbnails
mount -t cifs //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  Thumbnails
It creates the mount and as long as I'm logged in as root, I can copy files to the XBMC Thumbnails folder and they appear on my unRaid server's Thumbnails folder. The problem is that if I log in as kevin (the user that XBMC runs as) I get permission denied errors. I've tried changing ownership of the XBMC Thumbnails folder to kevin via :

Code:
chown -v kevin Thumbnails
and it says it changed it, but if I check, the ownership and group both still show as root. I'm thinking that may be because now that the mount is made, it's showing the ownership of the Thumbnails folder on the unRaid server? Whatever it's doing I can't seem to change it and XBMC can't write it's thumbnails because of this.

Can anyone show me the light here. I'm dying to get this up and running.
 
Old 05-05-2010, 07:13 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
By not providing credentials when you mount the remote drive, you're probably getting authenticated as 'guest' which may not have write access. The mount should look more like:

Code:
mount -t cifs -o user=xxx,password=yyy //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  Thumbnails
or

Code:
mount -t cifs -o credentials=/path/to/credentials //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  Thumbnails
cheers
 
Old 05-05-2010, 08:05 PM   #3
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
OK. Whose username and password should that be? An XBMC username/password or an unRaid username/password?

Due to the unRaid being a NAS, all it's shares and stuff were setup "out of the box". I didn't have to set any of that up. The unRaid shares that are available across my network never require any usernames or passwords whenever I copy stuff to them from my Windows machines. The only username/password I'm aware of for it is root which I use once in a blue moon to log into the console.
 
Old 05-05-2010, 08:10 PM   #4
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
I've just tried all the users I know of on both machines and every time I try to manually copy a file to that directory while logged in as kevin, I get permission denied.

Last edited by Bozrdang; 05-05-2010 at 08:21 PM.
 
Old 05-05-2010, 08:58 PM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Ok ... can you try mounting it when logged in as kevin ?
 
Old 05-05-2010, 08:59 PM   #6
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
That's how I have been mounting it, but I have to use sudo to do it.
 
Old 05-05-2010, 09:01 PM   #7
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Can you post the output of 'cat /proc/mounts' ?
 
Old 05-05-2010, 09:04 PM   #8
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Code:
kevin@XBMCLive:~$ cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,mode=755 0 0
/dev/disk/by-uuid/5abc3f4e-ef7f-465e-b77d-fd44043af391 / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
none /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /var/run tmpfs rw,nosuid,relatime,mode=755 0 0
none /var/lock tmpfs rw,nosuid,nodev,noexec,relatime 0 0
none /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
192.168.1.20:/mnt/user/xbmc /mnt/xbmc nfs rw,relatime,vers=3,rsize=262144,wsize=                                     262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.20,mountvers=3,mountproto=tcp,addr=192.168.1.20 0 0
//192.168.1.20/disk7/xbmc_thumbs/Thumbnails /home/kevin/.xbmc/userdata/Thumbnails cifs rw,mand,relatime,unc=\\192.168.1.20\disk7,username=root,uid=0,noforceuid,                                         gid=0,noforcegid,addr=192.168.1.20,file_mode=0755,dir_mode=0755,prepath=\xbmc_thumbs\Thumbnails,serverino,rsize=16384,wsize=57344 0 0

Last edited by Bozrdang; 05-05-2010 at 09:05 PM.
 
Old 05-05-2010, 09:18 PM   #9
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
In looking at that, I think there are some remnants of different attempts to get this working. I know the line where it says '192.168.1.20:/mnt/user/xbmc /mnt/xbmc' was a line someone had me add to fstab to try to do this whole thing a different way. I must have forgot to remove it. Here is the line they had me add to fstab:

Code:
192.168.1.20:/mnt/user/xbmc /mnt/xbmc nfs rw,hard,intr 0 0

Last edited by Bozrdang; 05-05-2010 at 09:20 PM.
 
Old 05-05-2010, 09:20 PM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Try adding file_mode=0777 and dir_mode=0777 to your mount options

<edit> .. that's your CIFS mount options, not NFS </edit>

Last edited by kbp; 05-05-2010 at 09:22 PM.
 
Old 05-05-2010, 09:26 PM   #11
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Not to be stupid, but how do I do that? Just add them to the end of the mount -t cifs command?
 
Old 05-05-2010, 09:33 PM   #12
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Something like:

Code:
mount -t cifs -o file_mode=777,dir_mode=777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  Thumbnails
 
Old 05-05-2010, 09:35 PM   #13
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Not sure if this means anything:

Code:
kevin@XBMCLive:~/.xbmc/userdata$ sudo mount -t cifs -o file_mode=777,dir_mode=777 //192.168.1.20/disk7/xbmc_thumbs/Thumbnails  Thumbnails
WARNING: 'file_mode' not expressed in octal.
WARNING: 'dir_mode' not expressed in octal.
Password:
kevin@XBMCLive:~/.xbmc/userdata$
 
Old 05-05-2010, 09:36 PM   #14
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Here's the resulting permissions:

Code:
kevin@XBMCLive:~/.xbmc/userdata$ ls -l
total 160
-rw-r--r-- 1 root  root     296 2010-04-25 12:28 advancedsettings.xml
drwxr-xr-x 7 kevin kevin   4096 2010-04-25 18:19 bakThumbnails
drwxr-xr-x 3 kevin kevin   4096 2010-05-03 20:16 Database
-rw-r--r-- 1 kevin kevin 114527 2010-05-04 22:07 guisettings.xml
drwxr-xr-x 2 kevin kevin   4096 2010-01-23 22:43 keymaps
-rw-r--r-- 1 kevin kevin     83 2010-05-01 21:03 LastfmScrobbler.xml
-rw-r--r-- 1 kevin kevin   1573 2010-01-23 22:43 LCD.xml
-rw-r--r-- 1 kevin kevin     83 2010-05-01 21:03 LibrefmScrobbler.xml
drwxr-xr-x 5 kevin kevin   4096 2010-01-23 22:43 playlists
-rw-r--r-- 1 kevin kevin    309 2010-05-04 22:07 profiles.xml
-rw-r--r-- 1 kevin kevin    391 2010-01-23 22:43 RssFeeds.xml
-rw-r--r-- 1 root  root    1339 2010-01-23 22:56 sources.xml
dr----x--t 1 root  root       0 2010-05-05 21:41 Thumbnails
drwxr-xr-x 2 kevin kevin   4096 2010-03-10 14:20 visualisations
 
Old 05-05-2010, 09:40 PM   #15
Bozrdang
LQ Newbie
 
Registered: Oct 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Now it won't even let me go into the Thumbnails directory let alone write something.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Lack basic understanding of permissions(apache permissions problem) cK` Linux - Newbie 7 04-08-2010 11:49 PM
Permissions problem with SMB mount SLES 10 chickenminnie Linux - Newbie 5 12-21-2009 01:51 PM
mount: no medium found (Permissions problem?) rose_bud4201 Linux - Hardware 5 08-27-2006 05:29 AM
mount permissions for hd* and sd* Vincent_Vega Linux - General 2 08-07-2006 02:30 PM
Mount permissions The_Messiah Linux - Newbie 3 04-05-2005 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration