Hi all,
My N40L is running Ubuntu 12.04 Server and I'm sharing to Windows XP, 7, 8 computers through Samba. To get this working, I set all permissions on the Samba drives to 777. I also SFTP into the server to grab/throw files on. For me, everything is working just fine.
I've got relatives overseas and I want to give them access to my drive (so they can look at photos, etc. I've got on there). This is where the problem lies. I don't mind them looking at all I've got, but I want to restrict them to read-only, or maybe read and upload to server, but I specifically do not want them to be able to delete files. They're elderly and it was them that actually asked if it's possible as they're scared of doing something wrong. This, naturally, makes me twice as scared.
From what I've tried, I can't change the permissions on the drive without ruining the 'write' permissions when I'm using my Windows machines, or am I just doing something wrong?
Please help!
Cheers,
SlayerYoda
Where you are going wrong is (presumably) using the anonymous samba connection profile to have full permissions. Note that this is connected, but not quite the same as the file system permissions.
To do what you want you should make an account for your personal usage, which has full write access, and change annonymous (or make a new account) which does not. You can create a share or part of a share called 'public' or 'uploads' that everyone can write to.
accounts in samba can be connected to account in Ubuntu. They can be limited in their actions both by samba and by Ubuntu. So assuming you have complete annon access set up you can either:
OR
The second is more powerful but also more complicated.
As for file permissions, the '777' you refer to works like this:
The number itself represents read(4), write(2) and execute(1) added together. Execute is a special unix permission and asside from directories should probably NOT be used for files in a samba share (so using 7 isn't a great idea).
As you can probably tell by now this is REALLY complicated. There are lots of ways of doing what you want, depending on your existing setup, need for flexibility and what areas you are most familiar with. Hopefully this gives you a good start.