[Linux]I can copy to shared folders just not when mounted.


Recommended Posts

Ok here's my situation.

In Ubuntu, when I go to Network > Windows Network > Workgroup > WindowsPC > SharedFolder. I can copy to it and everything normal.

When I do the following steps to mount it :

sudo mkdir /media/filehost

sudo mount -t cifs -o username=server,password=secret //192.168.0.43/SharedFolder/ /media/filehost

Everything works, I get the icon in my desktop and I can see all the files in the folder. Hell I can even open the files just fine, the one thing I can NOT do is write! Which was the purpose of the mount in the first place.

All I want is a damn short cut to that folder on my desktop and to be able to write to it. I don't get why I can write to it when I browse to it normally just not when I mount it? Any help is appreciated, thanks guys!

Link to comment
Share on other sites

Sounds like a permissions issue on the opposing end (I've had issues with samba running on Windows 2003 server because of clear passwords). Can you give more details on the Windows setup?

Link to comment
Share on other sites

Add rw to the end of the command and see if that helps

sudo mount -t cifs -o username=server,password=secret //192.168.0.43/SharedFolder/ /media/filehost rw

Link to comment
Share on other sites

It's Windows XP, I set permissions to everyone on the folder I'm sharing (even BEFORE this I was able to write to it but I did it just in case).

I don't get how I'm able to write to it when I browse it, just not when I mount it?

What I don't get is that it lets me WRITE/READ perfectly but ONLY when I browse through the folders manually. Even then, when I mount the shared folder I mount it with the administrator username and password.

So there are two things that are pointing that permission isn't an issue, what else could it be?

Add rw to the end of the command and see if that helps

sudo mount -t cifs -o username=server,password=secret //192.168.0.43/SharedFolder/ /media/filehost rw

man 8 mount

Displays the following:

-w, --rw

Mount the filesystem read/write. This is the default. A synonym

This seems to be the default but I added it anyway and did not change anything.

Link to comment
Share on other sites

according to documentation you may want to try:

TRY THIS AS A LAST RESORT: AS OTHER DOCS REPORT YOUR WAY

mount -t cifs tcp_name_of_server:share_name /mnt -o user=myname,pass=mypasswd

Also, wireshark provides support for the SMB/CIFS network traffic to see what's really going on.

Link to comment
Share on other sites

Also, have you thought about adding this exclusively to FSTAB

Once it is mounted try a fstab -l to see what is going on?

Also, consider the following:

Windows XP has what is called "simple file sharing" enabled by default. This forces guest access to the share and does not allow permissions (read, write, etc.) based on specific user accounts. If you run into problems getting CIFS to work, consider disabling simple file sharing.

To disable it, go to: My Computer -> Tools -> Folder Options -> View Under Advanced Settings: Uncheck "Use Simple File Sharing" Click Apply, OK

Optionally, run the Network Setup Wizard in Windows Control Panel in order to set up your share(s).

Password Note: Make sure the user account that you wish to access the share has a password. Windows XP will reject any logins over the network which don't use a password.

Link to comment
Share on other sites

add ,uid=1000 in the option string

sudo mount -t cifs -o username=server,password=secret,uid=1000,rw //192.168.0.43/SharedFolder/ /media/filehost

be sure that your user user id (uid) is correct, you can find it in /etc/passwd. It will give ownership of the mount point to you.

Link to comment
Share on other sites

add ,uid=1000 in the option string

sudo mount -t cifs -o username=server,password=secret,uid=1000,rw //192.168.0.43/SharedFolder/ /media/filehost

be sure that your user user id (uid) is correct, you can find it in /etc/passwd. It will give ownership of the mount point to you.

YESSSSS! You are my hero! uid=1000,rw pretty much did it, THANKS A LOT!

...Now, how exactly would I put this on /etc/fstab? specially the uid=1000... is it all the same or is the syntax different?

Never mind, I got it. I added this line to /etc/fstab:

//server/SharedFolder /media/filehost smbfs rw,uid=1000,username=Everyone,password=  0  0

Pretty much did it, thanks again everyone for your help!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.