Score:0

Files become read-only when adding files to a Samba share between Ubuntu and Windows

sa flag

I'm very green with Linux/Ubuntu in general so please forgive me.

I'm trying to setup a shared network folder so I can copy over files from my Windows PC without needing to use a physical drive. I used Samba to create a shared directory and was able to link to it on my PC. I made sure all the permissions were correct for the shared folder. The problem now is I can only add files to the shared directory. Any files created within are read-only, which defeats the whole purpose. What do I need to do to make sure everything within the shared directory has the same permissions?

in flag
To be clear, you can *write* files to the Samba share on Ubuntu, but cannot read the files back to your Windows machine(s). Is this correct? Which version of Ubuntu are you using? How was the Samba share configured?
BradytheBeginner avatar
sa flag
@matigo I'll try to answer your questions as best I can but I might be misunderstanding. While in Ubuntu I can access everything with full permissions, but when using the windows machine I can only write to the first folder, any deeper and it becomes read only. The Samba share was configured as default, but in "Local Network Share" settings I checked both boxes trying to allow full permissions.
Nmath avatar
ng flag
Can you provide more details? For example *"I made sure all the permissions were correct"* - what actions did you take exactly? It's best if you recount all steps in a reproducible way so we can understand exactly what you did when you set up the share. A potential problem is that Windows and Ubuntu handle ownership and permissions very differently. Windows has no concept of the POSIX permissions and ownership that are used by file systems used by Ubuntu. It's possible that when you "made sure permissions were correct", you did something you didn't need to do which resulted in this problem.
guiverc avatar
cn flag
Please be specific, what OS & release are you using, if you're using command, what command you're getting and the exact error message you get you're asking about (a read-only file-system is a very different error to a directory that is read-only and your description isn't clear enough as to which read-only message(s) you're getting).
Score:0
es flag

While in Ubuntu I can access everything with full permissions, but when using the windows machine I can only write to the first folder, any deeper and it becomes read only. The Samba share was configured as default, but in "Local Network Share" settings I checked both boxes trying to allow full permissions.

So you created a samba usershare allowing full access to the share to everyone. The usershare process ( Local Network Share ) enables that by setting Linux permissions to the folder being shared so that it is writeable to everyone.

But not to the folders underneath. If you created on the Ubuntu machine a folder within that shared folder as user brady for example it will have Linux permissions of 755. The samba client can write to the parent folder but not to the subfolder.

Since you are using the "Local Network Share" process what you could do is:

** Edit /etc/samba/smb.conf

** Right under the workgroup = WORKGROUP line add this one:

force user = brady

Change brady to your actual Ubuntu login user name.

** Then restart smbd:

sudo service smbd restart

The samba client will be viewed as brady for these shares so if brady on the Ubuntu machine itself has full access so will the samba client on the Windows machine.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.