Linux.com

Permissions issue.

Link to this post 31 Oct 11

Hi Dear Sirs:
I am having a little problem with permissions of a file, and can´t find a solution,
I have a mail Server with Postfix, Courier and Roundcube as Webmail.
When I give in the user´s directory permissions to root (/maildir/user root:root), login is ok in Roundcube but can´t send mails, and logs show: "/maildir/domain.com/user/tmp/mail_id.server_name: Permission denied)"
If I give in user´s directory permissions to another user, for example mail (/maildir/user mail:mail), I can send mails but can´t login into Roundcube Webmail.
Please excuse me if this is not the correct place for asking for help with this issue.
But I ´ve been looking for a solution for some days but can´t find it.
Any help will be welcome.
Thanks for your attention Sirs.
Best regards,


Javier


Link to this post 01 Nov 11

I have moved the post to the System Management category to help better index the question.

Have you attempted to review the username being used by reviewing the output of lsof when the the operation is being requested? This can help you to identify the username being used so you can adequately set the permissions.

Link to this post 01 Nov 11

Thank you very much for your help mfillpot.
I´ll be testing what I can find with lsof and post what I find.
Thanks again.

Best regards

Link to this post 01 Nov 11

This is what I find with lsof:

lsof -i :143
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
couriertc 2849 root 3u IPv4 7630 TCP mail.server:imap2 (LISTEN)
couriertc 2849 root 5u IPv4 7631 TCP localhost:imap2 (LISTEN)

Seems that root is the username being used.
I´ve changed the courier directory UID and GID to mail:mail but when I do lsof -i :143 still root as the username in used.
Still can´t find a solution to this issue.
Thanks again for you attention.

Link to this post 02 Nov 11

You are looking at the network traffic rather than the files, you will want to use grep on the output to find the files in the mail directories, once you see the that those are accessed you will be able to locate the application and username used.

Link to this post 02 Nov 11

Thanks again mfillpot for taking time to answer me.
Could you please give me an example of how would you combine the lsof with the grep command so as to be able to find those files in the mail directory?
Thank you very much Sir.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board