Issue deleting file from share using cifs mount

allanon09
Posts: 4
Joined: Sun Sep 05, 2010 5:59 pm

Issue deleting file from share using cifs mount

Postby allanon09 » Sun Sep 05, 2010 6:09 pm

Alright, here goes.

I have a ton of video files in a movies share that is part of the greyhole storage. I want to move the tv shows that are in the movies section into a share I created called tv shows.

Here are the commands I am using to mount the two shares so I am doing the transfer somewhat locally.

Code: Select all

sudo mount.cifs //hda/Movies /home/cerebro/movies -o domain=WORKGROUP,username=cerebro sudo mount.cifs //hda/TV\ Shows /home/cerebro/tvshows -o domain=WORKGROUP,username=cerebro
Both mount just fine and I can browse both directories after they are mounted. The problem is that I have zero ability to create, modify or delete anything on either mounted share.

I can navigate from my windows box to the HDA and I can create, modify, or delete anything. This is probably something simple but it is escaping me.
I can also use smbclient to connect to any share and I am able to delete files.

Any help that anyone can offer would be great!

Quick question on the side: Why is it that when I create a file through a share from windows and then view the owners via terminal it is root:root instead of admin:users ?

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Issue deleting file from share using cifs mount

Postby gboudreau » Tue Sep 07, 2010 6:55 pm

You need to mount like this, to be able to write on your mounts:

Code: Select all

sudo mount.cifs //hda/Movies /home/cerebro/movies -o domain=WORKGROUP,username=cerebro,uid=500,gid=100,file_mode=0660,dir_mode=0770,hard
To answer your other question, the symlinks you'll find in /var/hda/files/share_name/ are owned by root because greyhole created them, and greyhole runs as root. But the files they point to should be owned by the user who created the file on the share.

Code: Select all

ls -l /var/hda/files/share_name/filename
will show you the target of the symlink *after the arrow)
you can ls -l that file to see the real owner of the file.
- Guillaume Boudreau

allanon09
Posts: 4
Joined: Sun Sep 05, 2010 5:59 pm

Re: Issue deleting file from share using cifs mount

Postby allanon09 » Tue Sep 07, 2010 7:49 pm

Wow... thank you! I changed the UID to match the user I was working with and all is good.

Who is online

Users browsing this forum: No registered users and 14 guests