Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761
Rep:
Quote:
lrwxrwxrwx 1 root root 41 Jan 28 07:20 default_pref
Why do you need to change the permissions on a symbolic link?
Quote:
../../../../etc/squirrelmail/default_pref
The real permissions are on the target file.
"The file-system permissions on the symbolic (or soft) link have no relevance: the permissions set on the file to which the symlink points control the access rights." http://en.wikipedia.org/wiki/Symbolic_link
Also make sure you first cd to the directory that contains the file you want to set permissions on.
You think to go into the directory that contains the file with the command CD?
I forget to say something.
When I do anything (chmod, chown, chgrp) with that file, another file has been changing (/etc/squirrelmail/default_pref).
For example if I want to change the ownership of the file /var/lib/squirrelmail/prefs/default_pref from root to apache, this file doesn't change but the file /etc/squirrelmail/default_pref changes.
Why do you need to change the permissions on a symbolic link?
Because I can't use squirrelmail (webmail). When I want to see mails and type username and password to login I get the following error:
Code:
Error
Error opening /var/lib/squirrelmail/prefs/default_pref
Could not create initial preference file!
/var/lib/squirrelmail/prefs/ should be writable by user apache
Please contact your system administrator and report this error.
Whatever I do I have the same problem.
So one more time:
Squirrelmail is installed. As soon as I go to www.mydomain.com/webmail the squirrelmail login page appears. I type the password and username, but when I click on the submit button I get an error:
Quote:
Error opening /var/lib/squirrelmail/prefs/default_pref
Could not create initial preference file!
/var/lib/squirrelmail/prefs/ should be writable by user apache
Please contact your system administrator and report this error.
The directory /var/lib/squirrelmail/prefs/ owned by apache and is in apache group. The premission is 775.
/var/lib/squirrelmail/prefs/default_pref is a symbolic link to the /etc/squirrelmail/default_pref. The file /etc/squirrelmail/default_pref is owned by apache and is in apache group. The file premission is 775.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.