Author |
Message |
gatorback
|
Posted: Sun Sep 09, 2007 1:30 pm |
|
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location:
Minnesota- Brrrrr!
|
I added a USB hard drive to the system and formatted with a linux filesystem. I mounted to the system successfully and was able to transfer movies to the new drive.
I am able to see the USB HDD contents through a samba connection on my XP machine, however, I am unable to transfer files onto the drive. I believe it is a permission issue. I was unable to change permissions from my XP machine.
I am able to change the permissions on the MythTV server, however chmod seems to have no effect on the USBHDD. What must be done to change the permissions on the USB HDD?
_________________ R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB
|
|
Top |
|
 |
bruce_s01
|
Posted: Sun Sep 09, 2007 2:13 pm |
|
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location:
UK
|
It could be the permissions provided by the Samba share, remember the share itself provides a set of permissions in addition to the disk permissions.
What user are you accessing the files on the drive and is it a different user to the remote user ID?
Bruce S.
_________________ Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P 16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD, SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080 Hauppauage Nova-T 500, Nova-T LinHes R8.6.1
|
|
Top |
|
 |
jmckeown2
|
Posted: Sun Sep 09, 2007 3:08 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
What happens if you make a directory on the drive, and chmod that to be writable?
I'm poking at is this a problem with the top of the share, or is it contents as well.
|
|
Top |
|
 |
cecil
|
Posted: Sun Sep 09, 2007 3:26 pm |
|
 |
Site Admin |
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location:
Whittier, Ca
|
Perhaps you should provide a sample the output of ls -al of the drives contents.
|
|
Top |
|
 |
gatorback
|
Posted: Sun Sep 09, 2007 6:27 pm |
|
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location:
Minnesota- Brrrrr!
|
I am using (primarily) putty to access the server and perform commands. I use XP's explorer to test file access through the Samba mechanism.
I mounted the device with:
Code: root@mythtvhost:~# mount /dev/sda1 /myth/500 Here is a listing using ls -al Code: root@mythtvhost:/myth/500# ls -al total 164 drwxr-xr-x 5 root root 32768 Dec 31 1969 . drwxrwxrwx 24 root root 4096 Aug 24 23:39 .. drwxr-xr-x 2 root root 32768 Jan 24 2007 autorun -rwxr-xr-x 1 root root 69 Nov 17 2005 autorun.inf drwxr-xr-x 5 root root 32768 Sep 9 20:22 media drwxr-xr-x 5 root root 32768 Jan 24 2007 wd_windows_tools Before & After of using the chmod command: Code: root@mythtvhost:/myth/500/media# ls -l total 75456 -rwxr-xr-x 1 root root 77182976 Jul 4 19:12 Solar Export20070704-001.mpg drwxr-xr-x 2 root root 32768 Aug 25 23:28 Tennis root@mythtvhost:/myth/500/media# chmod 777 Solar\ Export20070704-001.mpg root@mythtvhost:/myth/500/media# ls -l total 75456 -rwxr-xr-x 1 root root 77182976 Jul 4 19:12 Solar Export20070704-001.mpg drwxr-xr-x 2 root root 32768 Aug 25 23:28 Tennis
As you can see, there was no effect on the permissions on the target file. I tried to create a test directory and was unable to change the permissions: Code: root@mythtvhost:/myth/500/media# mkdir test root@mythtvhost:/myth/500/media# ls Solar Export20070704-001.mpg Tennis test chmod has no effect on the new directory: Code: root@mythtvhost:/myth/500/media# chmod 777 test root@mythtvhost:/myth/500/media# ls -l total 75488 -rwxr-xr-x 1 root root 77182976 Jul 4 19:12 Solar Export20070704-001.mpg drwxr-xr-x 2 root root 32768 Aug 25 23:28 Tennis drwxr-xr-x 8 root root 32768 Aug 25 23:00 bob drwxr-xr-x 2 root root 32768 Sep 9 20:22 test
_________________ R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB
|
|
Top |
|
 |
bruce_s01
|
Posted: Sun Sep 09, 2007 7:05 pm |
|
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location:
UK
|
I thought the default permissions for mount were readonly, I think you will have to mount the drive read/write.
Code: mount -w /dev/sda1 /myth/500
Bruce S.
_________________ Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P 16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD, SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080 Hauppauage Nova-T 500, Nova-T LinHes R8.6.1
|
|
Top |
|
 |
cecil
|
Posted: Sun Sep 09, 2007 7:15 pm |
|
 |
Site Admin |
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location:
Whittier, Ca
|
I'd recommend that root not own anything. Perhaps something like:
/mnt/usb/media where media is own by mythtv. For the exports to offer full control, mythtv just own the exported directories.
|
|
Top |
|
 |
gatorback
|
Posted: Sun Sep 09, 2007 7:39 pm |
|
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location:
Minnesota- Brrrrr!
|
I tried this:
Code: root@mythtvhost:/myth/500# mount -w /dev/sda1 /myth/500
root@mythtvhost:/myth/500# ls -l total 128 drwxr-xr-x 2 root root 32768 Jan 24 2007 autorun -rwxr-xr-x 1 root root 69 Nov 17 2005 autorun.inf drwxr-xr-x 5 root root 32768 Sep 9 20:22 media drwxr-xr-x 5 root root 32768 Jan 24 2007 wd_windows_tools root@mythtvhost:/myth/500# chmod 777 /myth/500 -R root@mythtvhost:/myth/500# ls -l total 128 drwxr-xr-x 2 root root 32768 Jan 24 2007 autorun -rwxr-xr-x 1 root root 69 Nov 17 2005 autorun.inf drwxr-xr-x 5 root root 32768 Sep 9 20:22 media drwxr-xr-x 5 root root 32768 Jan 24 2007 wd_windows_tools
I believe that this should have opened all permissions for the directories listed above. Is my testing valid?
_________________ R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB
|
|
Top |
|
 |
mjl
|
Posted: Sun Sep 09, 2007 8:18 pm |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
Reread Cecil's comment, ownership. if root owns it noboby can write to it, except root. try as root:
# chown mythtv:mythtv /myth/500
# chown mythtv:mythtv /myth/500/*
# chown mythtv:mythtv /myth/500/*/*
repeat until it reports no more files, it may not be the best way but does work
You will want to reduce the permissions to only what is needed also
This should allow user mythtv some access.
Mike
|
|
Top |
|
 |
nigelpearson
|
Posted: Mon Sep 10, 2007 5:28 am |
|
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location:
Sydney, Australia
|
chown -R mythtv:mythtv /myth/500
_________________ | Nigel Pearson, nigel.pearson.au@gmail.com| "Things you own end up owning you" - Tyler, Fight Club
|
|
Top |
|
 |
mjl
|
Posted: Mon Sep 10, 2007 5:37 am |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
nigelpearson's way is most likely the proper way
Thanks
Mike
|
|
Top |
|
 |
jmckeown2
|
Posted: Mon Sep 10, 2007 6:13 am |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
Having the -R at the end of the chmod should have resulted in some sort of error "-R file not found" or something like that. Plus apparantly well-formatted versions of the command are doing nothing; not even erroring. Is is possible you have an alias or maybe a script named chmod first in your path?
What do you get from:
Code: which chmod
Can you chmod some unimportant files on a different filesystem? You can use "touch filename to create empty files that are safe to play with.
Finally you mentioned that you put a linux file system on this disk, which one? ext3? (not that I can see hoe it makes a difference yet...) and can you confirm my assumption that were talking about an actual spinning platter drive, and not a flash drive.
|
|
Top |
|
 |
nigelpearson
|
Posted: Mon Sep 10, 2007 6:31 am |
|
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location:
Sydney, Australia
|
The partition may be mounted as something strange (union filesystem?)
I would try unmounting it, and then check if there are any files under /myth/500. If there are, delete them, and then mount the USB as read/write?
_________________ | Nigel Pearson, nigel.pearson.au@gmail.com| "Things you own end up owning you" - Tyler, Fight Club
|
|
Top |
|
 |
gatorback
|
Posted: Mon Sep 10, 2007 9:35 am |
|
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location:
Minnesota- Brrrrr!
|
EVERYONE
========
I agree with the approach and have made an effort to address each contributor's question(s). I appreciate the effort put into the questions and the helpful (code) responses.
Here is the result of using nigel's chown command. The USB HDD is NOT mounted
Code: root@mythtvhost:/myth# ls /myth/500 -ld drwxr-xr-x 2 mythtv mythtv 4096 Aug 24 23:39 /myth/500
root@mythtvhost:/myth# mount -w /dev/sda1 /myth/500 root@mythtvhost:/myth# ls /myth/500 -ld drwxr-xr-x 5 root root 32768 Dec 31 1969 /myth/500 root@mythtvhost:/myth# chown mythtv:mythtv /myth/500
chown: changing ownership of `/myth/500': Operation not permitted root@mythtvhost:/myth# ls /myth/500 -ld drwxr-xr-x 5 root root 32768 Dec 31 1969 /myth/500
I am not sure why I can not chown here. I am performing the commands as root. jmckeown2======== Yes the USB device is a 500GB Western digital HDD "mybook" device. I was able to chmod on the server's HDD. I created a 'test' directroy in /myth, as root. Here are the results: Code: drwxr-xr-x 2 mythtv mythtv 4096 Sep 10 11:14 test File System? Not sure how to get that info. Tried (unsuccessful) fdisk, however, these are the results. Code: root@mythtvhost:~# umount /myth/500 root@mythtvhost:~# fdisk sda Unable to open sda root@mythtvhost:~# Per your request: Code: root@mythtvhost:~# which chmod /bin/chmod What does this tell you? nigelpearson========= I am not sure how to check mounting paramaters. I use the mount command described above: Code: mount -w /dev/sda1 /myth/500 Please let me know if I can perfom a specific test for you. A check for files after dismounting the USB HDD shows that there are no files: Code: root@mythtvhost:/myth# umount /myth/500 root@mythtvhost:/myth# ls /myth/500 root@mythtvhost:/myth#
UPDATE======I discovered the list option for the mount command: it will list the file system type: Code: root@mythtvhost:/myth# mount -l /dev/hda1 on / type ext3 (rw,errors=remount-ro) [Root] /dev/hda3 on /myth type ext3 (rw) [myth] usbfs on /proc/bus/usb type usbfs (rw,devmode=0666) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /myth/500 type [b]vfat [/b](rw) [My Book]
I thought I had changed it to ext3, however it says it is vfat. That would explain why I could not transfer a very large 13GB file (Wimbledon Finals) to the drive.
_________________ R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB
|
|
Top |
|
 |
gatorback
|
Posted: Mon Sep 10, 2007 10:40 am |
|
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location:
Minnesota- Brrrrr!
|
OK, I think I found the problem.
I had forgotten that I attempted to automate mounting by putting the last line in /etc/fstab
Code: # filesystem mountpoint type options dump pass /dev/hda1 / ext3 defaults,errors=remount-ro 0 1 /dev/hda3 /myth ext3 defaults,auto 0 2 #dev/sda1 /myth500
Now that the line is commented out, I can manually mount the drive and write to it. Would be nice if I did not have to manually issue this command and it would automatically mount.
_________________ R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB
|
|
Top |
|
 |