Quick question – I have a server running Ubuntu server edition with SMB server all set up and running. I've set up the main root of the drive to be shared and I've set up a user in /etc/samba/smbusers to say root = "joeflood" so I can sign in as root using the username "joeflood". This works and I have read/write access to the filesystem (yay!). However, if I browse to /home/javawag (my main user home directory), I no longer have write permissions! I can see all the files in there and read them no problem, but writing is a no-go. I'm logged in as root though?! Btw, I can login via SSH and create folders/etc as root in the /home/javawag folder, and they showed up in the SMB mount on my mac too... help!!

Many thanks,

  • Joe

There are a number of factors that determine who can write and who cannot write to a share in samba.

First off, sharing out the entire hard drive from your server is a downright stupid thing to do. It may seem convenient but it's really really dangerous. Imagine you get a virus on a PC on your network and it deletes the files on network shares - bang goes your server!

Samba has a [homes] share that automatically shares out the home directories of all the users on the server - you should be using that to access your home directory.

Then you should only share out other specific areas that you need to share out - like a shared data folder, or your /var/www folder for editing websites, etc.

| improve this answer | |
  • That's a good point... that said, I only have my mac set up to access it as it has a strong password on it and no guest access... I sort of like having root access via SMB but actually the more I think about it, the less of a problem it is - my web server runs from /home/javawag/www anyway instead of /var/www. I'll look into the homes share actually - just thinking if I was to create folders in /home/javawag under SMB as it's (almost) set up now, they would be owned by root... – Javawag Feb 26 '11 at 17:20
  • Cool, all set up now, removed root from user list, removed roots password from SMB, added my user and set up the [homes] share. All sorted and up and running, thanks for the advice :D – Javawag Feb 26 '11 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.