This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

[SOLVED]Permissions problems with an external drive

phelgan

Wed Sep 04, 2013 10:28:46 pm

Hi All,

Having "correctly" mounted a GoFlex Home device (see here, I have now written a script to back files up to it. The idea is that each user has a copy of this script personalised for them that will run on login.
However, the GoFlex mounts with owner and group of "root" and thus requires root or sudo to allow copying. As only one of the users is a sudoer, this is awkward.

I have attempted to chown and chgrp but nothing changes (interestingly no error occurs).
I have also unmounted and tried to mount as an ordinary user, but to no avail - "only root can do that".

Anyone any ideas on how I can change this?

Regards,

Phil

Wolfman

Thu Sep 05, 2013 4:45:48 am

Hi Phil,

open a terminal (Ctrl + Alt + t) and type:

Code:
gksudo nautilus


then navigate to the file/folder you want to change the permissions for and right click > Permissions > Owner > Group and make sure that your name is showing in the list.

Let us know if this helps.

Regards Wolfman :D
helal-recorder_1.0.7_i386.deb Properties_041.jpg

phelgan

Fri Sep 06, 2013 10:14:38 pm

Thanks Wolfman,

Sadly this did not work - I could select a new owner but the selection box would revert to root within a few seconds!
I have previously tried the command line, it would appear to accept chown or chgrp instruction but ls -l still showed root.

Phil

madvinegar

Sun Sep 08, 2013 8:03:22 am

Do you have the package "ntfs3g" installed?

phelgan

Fri Sep 13, 2013 9:11:10 pm

madvinegar wrote:Do you have the package "ntfs3g" installed?

I didn't - I'd looked at it, but not sure it was relevant.
Anyway have now....

Wolfman

Sun Sep 15, 2013 6:47:17 am

Hi phelgan,

is this solved now?.

Regards Wolfman :D

phelgan

Mon Sep 16, 2013 9:34:37 pm

Thanks Wolfman and Madvinegar

I think its solved ;) What a saga!

"ntfs-3g" made no difference. So I had another trawl of the web and revisited a page I'd already been on when I had my earlier troubles mounting the device from the command line at all, but missed something from.
I added the file_mode and dir_mode options and that gave me the permissions (owner is still root).
However I was still tied to needing sudo to mount. I would rather user only mounted the locations when needed (there are two locations, one is for backups and the other for shared files so they can be accessed across our home network) and am not keen on giving the children (or wife :oops: ) sudoers rights. If I changed fstab entries to "user" option, I still could not mount without sudo.

I then found mount.cifs (cifs-utils). With the "user" option in fstab, it allows the user to mount without sudo. A bonus is that you do not need to specify the password in open text in fstab - it will prompt if not present. The final (?) code in /etc/fstab is
Code:
In /etc/fstab: //192.168.1.65/GoFlex\040Home\040Public   /media/nas_public   cifs   iocharset=utf8,file_mode=0777,dir_mode=0777,_netdev,user,noauto   0   0
and for the mount command:
Code:
mount.cifs '//192.168.1.65/GoFlex Home Public' /media/nas_public -o user=phil,forceuid,uid=1000

Curiously the mount.cifs command seems to object the "\040" in place of a space, it reads it as "040". I assume this is why a shortened version does not work
Code:
mount.cifs //192.168.1.65/GoFlex\040Home\040Public


Thanks guys for the help, it is much appreciated.