write permission error on a shared drive

2014-11-29 Thread Mahmood N
HiA server and a client both run SL6.3. On server, I have exported a disk with 
the following property   /data 192.168.1.0/24(rw,sync,no_root_squash)
and on the client side, I wrote this entry in the fstab 
   192.168.1.5:/data   /data   nfs defaults 0 0

However on the client side, I am not able to create folders.
[mahmood@client data]$ mkdir afolder
mkdir: cannot create directory `afolder': Permission denied

However, root has the write permission.
[root@client data]# mkdir a
[root@client data]#
How can I grant the write permission tot he user? Regards,
Mahmood

Re: write permission error on a shared drive

2014-11-29 Thread Nico Kadel-Garcia
On Sat, Nov 29, 2014 at 10:56 AM, Mahmood N nt_mahm...@yahoo.com wrote:
 Hi
 A server and a client both run SL6.3. On server, I have exported a disk with
 the following property
/data 192.168.1.0/24(rw,sync,no_root_squash)

 and on the client side, I wrote this entry in the fstab
192.168.1.5:/data   /data   nfs defaults 0 0

 However on the client side, I am not able to create folders.

 [mahmood@client data]$ mkdir afolder
 mkdir: cannot create directory `afolder': Permission denied

 However, root has the write permission.

 [root@client data]# mkdir a
 [root@client data]#

 How can I grant the write permission tot he user?

 Regards,
 Mahmood

You need to learn about uid, gid, and file system permissions.
The user and the groupo that own a file are stored, on the NFS
serrver's file system, as numbers. Those numbers are tied to group and
owner as far as the login name and login user's groups by
/etc/passwd, /etc/group, and lots of different network tools that
can also do that.

If the user name on the client *has the same uid and group gid
memberships* as the server expects, then they'lll typically have
permission to write to those directories. This is much like file
ownership on a local directory. If someone else owns the directory,
*and did not allow write access to others*, others will not be able to
write there.

In this case, I would do ls -al /data and see who owns it. Then I'd
look up the man pages for chown and chgrp and chmod to get a
handle on what you want to allow and prevent.


Re: write permission error on a shared drive

2014-11-29 Thread Paul Robert Marino
Mahmood
you will also probably need to learn about the setgid bit.



On Sat, Nov 29, 2014 at 12:23 PM, Nico Kadel-Garcia nka...@gmail.com wrote:
 On Sat, Nov 29, 2014 at 10:56 AM, Mahmood N nt_mahm...@yahoo.com wrote:
 Hi
 A server and a client both run SL6.3. On server, I have exported a disk with
 the following property
/data 192.168.1.0/24(rw,sync,no_root_squash)

 and on the client side, I wrote this entry in the fstab
192.168.1.5:/data   /data   nfs defaults 0 0

 However on the client side, I am not able to create folders.

 [mahmood@client data]$ mkdir afolder
 mkdir: cannot create directory `afolder': Permission denied

 However, root has the write permission.

 [root@client data]# mkdir a
 [root@client data]#

 How can I grant the write permission tot he user?

 Regards,
 Mahmood

 You need to learn about uid, gid, and file system permissions.
 The user and the groupo that own a file are stored, on the NFS
 serrver's file system, as numbers. Those numbers are tied to group and
 owner as far as the login name and login user's groups by
 /etc/passwd, /etc/group, and lots of different network tools that
 can also do that.

 If the user name on the client *has the same uid and group gid
 memberships* as the server expects, then they'lll typically have
 permission to write to those directories. This is much like file
 ownership on a local directory. If someone else owns the directory,
 *and did not allow write access to others*, others will not be able to
 write there.

 In this case, I would do ls -al /data and see who owns it. Then I'd
 look up the man pages for chown and chgrp and chmod to get a
 handle on what you want to allow and prevent.


Re: write permission error on a shared drive

2014-11-29 Thread Mahmood N
OK. I managed to solve it temporarily by adding both users to the same group 
and setting chmod -R 775 /data
 Regards,
Mahmood 

 On Saturday, November 29, 2014 9:49 PM, Paul Robert Marino 
prmari...@gmail.com wrote:
   

 Mahmood
you will also probably need to learn about the setgid bit.



On Sat, Nov 29, 2014 at 12:23 PM, Nico Kadel-Garcia nka...@gmail.com wrote:
 On Sat, Nov 29, 2014 at 10:56 AM, Mahmood N nt_mahm...@yahoo.com wrote:
 Hi
 A server and a client both run SL6.3. On server, I have exported a disk with
 the following property
    /data 192.168.1.0/24(rw,sync,no_root_squash)

 and on the client side, I wrote this entry in the fstab
    192.168.1.5:/data      /data                  nfs    defaults    0 0

 However on the client side, I am not able to create folders.

 [mahmood@client data]$ mkdir afolder
 mkdir: cannot create directory `afolder': Permission denied

 However, root has the write permission.

 [root@client data]# mkdir a
 [root@client data]#

 How can I grant the write permission tot he user?

 Regards,
 Mahmood

 You need to learn about uid, gid, and file system permissions.
 The user and the groupo that own a file are stored, on the NFS
 serrver's file system, as numbers. Those numbers are tied to group and
 owner as far as the login name and login user's groups by
 /etc/passwd, /etc/group, and lots of different network tools that
 can also do that.

 If the user name on the client *has the same uid and group gid
 memberships* as the server expects, then they'lll typically have
 permission to write to those directories. This is much like file
 ownership on a local directory. If someone else owns the directory,
 *and did not allow write access to others*, others will not be able to
 write there.

 In this case, I would do ls -al /data and see who owns it. Then I'd
 look up the man pages for chown and chgrp and chmod to get a
 handle on what you want to allow and prevent.