On 06/11/15 10:52, Chris Walker wrote:
Hello,
Can somebody point me in the right direction please?
I'm trying to mount another linux box and although it mounts, I can't write to it which is my desired aim.
The box in question is a Humax Freeview machine and I can telnet into it and run commands from the command line and having installed ntfs-3g on it, I can now delete files from an attached usb drive using the screen menu on the device. The files are iPlayer programs which I download here, on my Magiea 5 machine.
Before I installed ntfs-3g, the contents of the fstab on the Humaxc looked like this :- /dev/sda1 on /media/drive1 type ntfs (ro,uid=0,gid=0,fmask=0177,dmask=077,nls=utf8,errors=continue,mft_zone_multiplier=1)
Afterwards, and after a reboot, it now looks like this :- /dev/sda1 on /media/usb-drive1 type fuseblk (rw,nosuid,nodev,user_id=0,group_id=0,allow_other)
As I said, it mounts here but all the files are owned by root and of course I can't copy new files to the USB drive.
I can FTP files to the box using humxftp as the user and a password of 0000 so my question is, what should I have in the fstab file on my machine to allow me to read from and write to the usb drive on the Humax?
In case you're curious, the relevant line from my fstab is currently this :- //Hummy/media /home/chris/Humax_Fox_HDR/ cifs nosetuids,uid=0,gid=0,credentials=/etc/samba/auth.hummy.humaxftp,sec=ntlm,_netdev 0 0 and the credentials file has two entries for user and password as in the FTP command.
Any help appreciated.
I'm confused. You say you're trying "to mount another linux box" which I take to mean you're trying to attach to a shared drive on another machine, but then you talk about USB drives. I'm confused to if this is a USB drive, and if it is, where it's mounted, and where you're trying to mount it.
Reading down a bit, it may become clearer - have I got this right? You've put a USB drive on the Humax machine, and you're trying to a) mount it on the humax, and b) then connect to it remotely from another machine? Is that right?
I'm also confused as to why the fstab changed after installing ntfs-3g. Did you change it? If there was n ntfs entry for it in fstab already, could the humax read and write the USB drive before installing ntfs-3g? If so, why did you install ntfs-3g?
The old fstab listed the drive type as ntfs. This sounds OK. The later type is listed as fuse. A fuse filesystem is a user-space driver I think. This is OK I think, but I don't know why it's changed.
As for Files owned by root and not writable by anyone else:
The user manual for Mount under NFS says this: "uid=value, gid=value and umask=value Set the file permission on the filesystem. The umask value is given in octal. By default, the files are owned by root and not readable by somebody else. "
You say after a reboot, "user_id=0,group_id=0". I've googled but can't find those options, but they sound like the drive is specifically set to be owned by root user and group. This suggests to me that it's doing exactly what it's asked to do!
So first question: why did you install ntfs-3g? What does it do? Next thing, I'd suggest commenting out the fstab entry for the USB drive and mounting it on the Humax manually. Work out what user if any you want to specify. Once you've done that and you can successfully read and write from it ON THE HUMAX (telnetted in to it or however), then you can translate these entries into an fstab entry.
You then mention your machine's FSTAB entry which includes "cifs". So basically your machine is trying to connect to a Samba (SMB/Windows/Cifs) shared drive or directory, presumably on the Humax. Now unless I'm missing something, drives don't end up as samba shares automatically - you have to set it up somehow. It's possible to set up the share so that files are read-only, or owned by a particular user. On a standard debian/ubuntu based machine, the config file for this is /etc/samba/smb.conf. This may be set up entirely differently on the humax however, and I guess it may even happen automatically. It's worth checking this first though, because no amount of messing with your machine's fstab will make a drive that's shared as read-only, writable.
Once you're happy with the samba settings, then comment out your machine's FSTAB cifs entry and try to mount it manually. Once you've got that working, then craft the fstab entry. Note again you're specifically setting the user id and group id (UID and GID) to be 0, which is root.
I hope this helps, but I may have got the wrong end of the stick!
Steve