LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Help with fstab entry to connect to network share (https://www.linuxquestions.org/questions/linux-networking-3/help-with-fstab-entry-to-connect-to-network-share-146001/)

adamsjw2 02-14-2004 10:41 AM

Help with fstab entry to connect to network share
 
Greeting all,
I have the following in my fstab so that I can mount a shared directory on a Netmax Linux file server:

//netmax/application /mnt/netmax smbfs auto,gid=users,username=jadams,password=abcd123 0 0

I can copy files FROM the server, but I can't write to it. I thought gid=users would fix this but it didn't. I also entered -o rw, into the entry and that didn't help either. I'm sure this is simply a syntax problem, resulting from my limited knowledge.

Any help would be greatly appreciated and any tweaks to make this file more stable would be accepted with excitement and many thanks :+)

TIA
Jim Adams

RobertP 02-14-2004 11:52 AM

Clarification: you have a server running Linux sharing a directory over a network using Samba.

Is the directory read only on the server? What is the result of this command on the server?
ls -l path_to_directory
If the directory is read only, you cannot create new entries or delete entries in the directory. There are good reasons for making the directory readonly, such as preserving its contents.

adamsjw2 02-14-2004 01:00 PM

RobertP,
Thanks for your quick and courteous response. Yes I have write privileges on the server. If I log into my Linux desktop as root and I can read and write. It's my regular user account that has the problem. As usual, I don't want to work from Root unless it's a must.
Jim

RobertP 02-14-2004 05:11 PM

What are the privileges on the directory? If you cannot write to it as a user, you will not be able to write to it over the network.
ls -l shareddirectory

adamsjw2 02-14-2004 06:41 PM

RobertP,
The username & password setup in the fstab entry are the same as the setup on the Linux Netmax server. Doesn't this take precedence over the local user name and password on my linux desktop, which isn't setup on the server? I think it should as the username root and the password I use to log onto my linux box isn't setup on the server either.
Jim

RobertP 02-15-2004 10:43 AM

Quote:

Originally posted by adamsjw2
RobertP,
The username & password setup in the fstab entry are the same as the setup on the Linux Netmax server. Doesn't this take precedence over the local user name and password on my linux desktop, which isn't setup on the server? I think it should as the username root and the password I use to log onto my linux box isn't setup on the server either.
Jim

One or both of us are confused. Giving a username and password does not allow you to override permissions on the server unless you are root. If you are adding the same line to the /etc/fstab on a Linux desktop machine as used in a Linux server, a different machine, the Linux server still uses the permissions on its own filesystem, that are revealed by the command ls -l issued on the server. The /etc/fstab can add additional restrictions to remote users such as readonly, but cannot give write access to a readonly file. A remote user cannot or should not be able to override those file permissions, unless he connects by ssh and issues commands as root. That is a major part of Linux's security. What do you see when you issue the ls -l command on the server? Are you not authorized to access the server?

If you want to give anyone on your network write access to a directory, that directory must have write permission for the owner or others as set by chmod under root.

adamsjw2 02-15-2004 11:24 AM

RobertP,
Thanks for your helpful comments. I think we're talking past each other. You write:

]One or both of us are confused. Giving a username and password does not allow you to override permissions on the server unless you are root. If you are adding the same line to the /etc/fstab on a Linux desktop machine as used in a Linux server, a different machine, the Linux server still uses the permissions on its own filesystem,

Here are my questions for my own education:

1) How does being root on my linux desktop override the permissions on the server in a way that the regular user account does not? Neither of these, regular user or root, has an account on the server to which I'm trying to connect. I thought, and possibly incorrectly, that when you add to the mount line in the fstab a username & password that corresponds to a username and password that has write permissions on the server, that would work. FYI, The user name and password that I use in the fstab, is the username and password of the administrator of the Linux server, which happens to also be me.

So, do I understand correctly that the Linux server doesn't use the entries in the fstab, but uses either the username of the person logged onto the linux desktop or the computer name of the linux desktop, or neither?

Sorry for my think-headedness on this and your patience in helping me understand. When I get back to work tomorrow I'll run ls-l on the server and double-check the permissions.

Jim


All times are GMT -5. The time now is 12:23 PM.