Mounting a share - permission issue(for me)

Hello,
Here is the issue I have for which I would like to understand as something is not working the way i was imagining. I have an external hard drive (ntfs by router’s choice) on which i created multiple directories which are own by my user id:
drwxrwxr-x 1 root root 0 Nov 18 16:40 Movies
I created a directory under my home directory where i want to mount it:
drwxr-xr-x 2 dan users 4096 Oct 22 22:50 new_zealand
I disconnec the drive properly and I attach the drive to the router(to be accessible by multiple users) and mount it as a root
mount -t cifs -o username=dan,password=***** //192.168.1.1/australia /home/dan/new_zealand/
and as soon as I do that this becomes
drwxrwxrwx 1 root root 0 Nov 20 21:38 new_zealand
that’s fine but I cannot change the ownership to my user:
chown: changing ownership of ‘new_zealand/’: Permission denied
why? I don’t know. I’m the root and trying to change permissions and cannot? I can see the files but cannot modify them. What do I do wrong? I encountered some other weird issues but after I solve this I’ll get into that.
thank you

On 2012-12-11 02:36, dmera wrote:
>
> Hello,
> Here is the issue I have for which I would like to understand as
> something is not working the way i was imagining. I have an external
> hard drive (ntfs by router’s choice) on which i created multiple
> directories which are own by my user id:
> drwxrwxr-x 1 root root 0 Nov 18 16:40 Movies

Please use code tags to insert computer produced text, like directory
listings or commands.

Posting in
Code Tags - A Guide

> that’s fine but I cannot change the ownership to my user:
> chown: changing ownership of ‘new_zealand/’: Permission denied
> why? I don’t know.

Because it is not a Linux filesystem. Instead you do it by playing with
mount options, and in the case of samba I’m not familiar with the syntax.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Thank you. At least you pointed me into a new direction I can search to find some answers.(samba shares).

On 12/10/2012 8:46 PM, dmera wrote:
>
> Thank you. At least you pointed me into a new direction I can search to
> find some answers.(samba shares).
>
>
dmera,

In a nut shell you need the uid and gid options in your mount statement. A good
HowTo is located here (it was written for 11.x but is still valid):

http://www.swerdna.net.au/susesambacifs.html

In addition see man mount.cifs

P.V.
“We’re all in this together, I’m pulling for you” Red Green