1

I have set up a mail server and I receive an error in the log file when trying to log in to Thunderbird.

chdir mydomain.com/admin/: No such file or directory

I was told that the the folder can be created by sending a mail to the newly created mail address, but the mail comes back with mailer-daemon.

Than I was told that the problem may be that the group "mail" has no write permission on the /var/mail folder. I do not understand how can I add this permission to the group.

I understand the command chmod g+w /var/mail but chmod has no such parameter to specify the group. Now the owner of the group is root. I checked the permissions in the GUI and it says the 'mail' group has Create and delete files folder access and --- File access.

ls -la /var/mail
drwxrwsr-x 3 root mail
drwxr-xr-x 12 root root
drwxrwsr-x 3 virtual virtual
  1. Do I need to change the permissions on the folder according to the suggestion above?

  2. How do I change the permissions on the folder?

enter image description here

3 Answers 3

1

from your output, it looks like you have a directory 'mail' inside /var/mail. it also looks like it already grants write permission to the mail group.

set the ownership of the folder to root:mail. this will mean root is the owner, and mail is the owner-group. you only get one owner-group, so thats why there is no option to set it.

# chown root:mail /var/mail/mail

set the permissions to give the ownergroup write permissions

# chmod 775 /var/mail/mail

if the problem you are having is permissions to /var/mail/mail and the user is a member of the mail group, then it sounds like this advice will not help you, as the mail group already has write permission.

4
  • No I don't have a mail folder in the mail folder. I added a screenshot of the GUI. I am not a linux guy, so what I need is to assign the group 'mail' write access to the /var/mail folder.
    – erdomester
    Jul 9, 2013 at 20:02
  • 'chown root:mail /var/mail' followed by 'chmod 775 /var/mail' should do you then. note, the second 7 in 775 grants your group full rights on the folder. Jul 9, 2013 at 20:05
  • What I don't understand is shouldn't this change the file access to write and read? (see the GUI img)
    – erdomester
    Jul 9, 2013 at 20:08
  • ignore the gui screen. The --- is just a place holder. those dropdowns do not show the current value, but instead allow you to set the permissions on all objects inside the folder. if you were to select "Read and Write" from the list, and click Apply, all the files in the folder would get the new permission, but if you closed and reopened the folder's properties window, it would still show ---. a folders permissions have nothing to do with the permissions of the objects within it, so you can't view them from the folders properties. Jul 10, 2013 at 4:08
1
  1. /var needs the permission for the group owner mail to create folder/files under it. check the permission for the folder:

    ls -ld /var
    

    change it using

    chmod 2775 /var
    
  2. /var/mail needs the permission for the group owner mail to create folder/files under it. check the permission for the folder:

    ls -ld /var/mail
    

    change it using

    chmod 2775 /var/mail
    
0

I'm not sure if it's necessary to alter the group ownership of the file, but to answer your second question:

chgrp is the command to change group permissions.

If you want to change user and group ownership, you can use chown user:group filename

2
  • The question is how do I change the 'mail' group File access permission to write and read?
    – erdomester
    Jul 9, 2013 at 19:44
  • # chmod 776 filename # chgrp mail filename Its just a matter of assigning the group to the folder, and setting the group permissions to read and write
    – Eric
    Jul 9, 2013 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .