Permissions issues on NFS Shares

Status
Not open for further replies.

Varun Chandak

Dabbler
Joined
Jul 20, 2014
Messages
29
I have installed FreeNAS 9.2.1.6 64 Bit on m system and configured 2 hard drives of 500GB in mirror format. I have created a volume and a dataset mailstore under that volume. I'll explain what is happening in detail.

I use email program which has a user and writes files to /mailstore partition with permissions mailjol:mailjol which means mailjol is a user and mailjol is a group.

So i had created a user and group with that name and assigned the uid/gid so that permission issues wouldn't occur for user mailjol.

Now while configuring, I stumbled upon the term "maproot user" and "maproot group". By default it was set to N/A. However, while testing this I found that this N/A being set, permission issues crept. However, setting it to mailjol:mailjol got rid of those problems. But 1 thing i noticed that as a root, if I created any file (touch /mailstore/abc) the default permissions were mailjol:mailjol whereas it should be root:root. I think setting maproot user and maproot group led to these permissions.

So I want to know what maproot user and maproot group functionality is as I can't find any proper tutorial on this.

Coming to second issue, under /mailstore, i have a folder processedmails with permissions as root:root and 0777. Inside that some html files are present with permissions qmailq:root and 0600. Now I am logged on as root and trying to cat those files, I get Permission Denied. I logged on as mailjol user and did cat, still I got the error.


How to resolve the above issues ? I can provide more details if required.


Thanks in advance.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
maproot user/ maproot group I believ does exactly what you described.. So when you touched that file it was correct to use mailjol..

In the docs you can read more about maproot etc.. http://doc.freenas.org/index.php/Unix_(NFS)_Shares#Creating_NFS_Shares

Perhaps you may want to try mapall versus maproot etc.. I'm by no means a permission expert.. I rarely play with NFS..

For your second issue is the how was qmailq created? Was this what the program did? aka created that folder.. You may need to create a user as qmailq versus mailjol or root.. Have you tried to chmod -R that folder as root giving 777? chown/chmod from ssh you should be able to do anything you like as root.. Just becareful as you can mess stuff up (permissions etc)
 

Varun Chandak

Dabbler
Joined
Jul 20, 2014
Messages
29
hii.. thanks for your reply...

actually i found out the problem was with maproot user.

initially I had set to maproot user mailjol and maproot group mailjol and thats why the default ownership was mailjol:mailjol.

I changed maproot user to root and the maproot group to N/A and it was working as desired. Now if any user creates a file, then owner is the user and group ownership is mailjol. This is working fine.

However, I tried maproot user to N/A and I got permission denied. Therefore I had to go with root.

As for your second query, qmailq is created when qmail program/software is installed for email purposes. It creates mail directories for users under /mailstore (configurable).. I have created qmailq user and qmail group according to the mailstore configuration. So no problems till now.... :)
 
Status
Not open for further replies.
Top