vsFTPd and Symbolic Links

  1. we have this folder: /tmp/harddisk/music
  2. we have the following folder for user: /tmp/harddisk/ftp_pvt/user
  3. we create a symbolic link inside user』s folder to point to the music folder:
ln -s /tmp/harddisk/music /tmp/harddisk/ftp_pvt/user/music

It seems like everything is okay. As long as the permissions for the folder music grants access for the right users, everybody following that symbolic link on the system should be able to do whatever he/she is allowed. But when trying to access that folder (following the symbolic link) via vsFTPd, the user will get:

Continue reading

Dovecot imap mkdir(/home/mailtest/mail/.imap/INBOX) failed: Operation not permitted

在這幾天朋友突然對自己的mail server 有興趣,立馬給了帳號給對方玩玩。
但神奇的事情發生了,以前曾經使用過imap收信過的帳號,都可以正常使用,但是新建的帳號卻是一直連線失敗。

看了一下log 之後(/var/log/maillog),出現如下大量的權限不足錯誤訊息。

Jul  5 00:55:53 almx dovecot: imap(mailtest): Error: mkdir(/home/mailtest/mail/.imap/INBOX) failed: Operation not permitted
Jul  5 00:55:53 almx dovecot: imap(mailtest): Error: chown(/home/mailtest/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted
Jul 5 01:13:39 almx dovecot: imap(mailtest): Error: file_dotlock_open(/home/mailtest/mail/.imap/INBOX/dovecot.index.log) failed: Permission denied

這搞了我半天的時間 X的!

Continue reading