Network Shares - Permissions


Recommended Posts

Hi,

Linux novice here.

I have a home network, mainly Windows. I want to share my movies library with a family member around 100 miles away. He wants to do the same with me, so we will have an identical library at each location. As more movies are ripped to a library they will sync across both libraries. Bittorrent Sync on Raspberry Pi looks ideal, I've made a start but hit a barrier.

I have 2 ADSL lines at home so I've tested this across the LAN and also over the internet. Everything seems to work correctly if each library is on a drive on its RPi (USB stick). But, at both ends we have our libraries on Windows machines (for example mine's WHS 2011). Within the Windows world these shares can be read and written to. Also, I use my library with an RPi OpenElec XBMC without any issues and the share can be read and written to.

I'm running Raspbian on the RPi i want to use, I have btsync running on startup and I've mounted the Windows share (as root) at /mnt/Movies. I have edited fstab to automount the share on startup. If I 'cd' to Movies and then request 'ls' I can read the contents of the library, but not write to it. I've tried to change ownership to user 'pi' and to change permissions to '777' but receive 'permission denied' messages for both requests.

Trying to use the btsync web gui tells me I do not have permission to write to the share, so that's consistent.

I get the feeling I'm lost in the 'permissions' area. Can anyone help please?

Many thanks, Andrew

Link to comment
Share on other sites

To get around this problem I added a script file to /etc/cron.hourly that changes the permissions as I want them. I am using the deb server packages provided by tuxpoldo which are using the default configuration running as root.

This is working fine for me as I do not usually need to access synched files right away, so haveing to wait up to an hour is not an issue.

Link to comment
Share on other sites

Chris H,

- what permissions are set on the share in Windows? - r/w for Everyone

- what permissions are set on the files in Windows? - r/w for Everyone

- with which user account do you connect to the share? - pi (the default for a new install of Raspbian)

(Windows share permissions are set to Everyone just for setup period, they will be locked down again once this issue is resolved)

Link to comment
Share on other sites

Chris,

Told you I was a novice. I misunderstood your 3rd question.

I am connecting to the share using an account that's on the Windows system. I am running the RPi as user 'pi'

WHS is based on Windows Server 2003 and has a gui and feature set that looks like Windows 7 (feature set a bit reduced, understandably). It's a full member of the Windows family.

Cheers, Andrew

Link to comment
Share on other sites

Eddie,

Yes, I'd thought of that but I'm running a number of other servers on that platform (PC backups, cloud sync, an SQL business application, ftps server) and it's only running on Intel Atom. It's the heart of the household IT network and I just thought this an ideal fit for the RPi.

If I can't make it happen on the Pi then I'll try WHS and see how hot it gets.

Many thanks.

Link to comment
Share on other sites

I've tried to change ownership to user 'pi' and to change permissions to '777' but receive 'permission denied' messages for both requests.

I'm fairly sleep deprived here, so my apologies if I misread something.

But to ask a stupid question - Did you use sudo when changing the permissions?

Link to comment
Share on other sites

Solved.

Some digging around on the web revealed that it the issue was permissions, as I suspected.

Thanks to: http://raspberrypihe...on-raspberry-pi

The solution is to set permissions when mounting, not after mounting, using :

sudo mount -t cifs -o user=<changeme>,password=<changeme>,rw,file_mode=0777,dir_mode=0777//<ip address>/<share>

Many thanks to everyone who has helped steer me to get this resolved.

Andrew

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.