Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-07-2007, 08:18 AM
|
#1
|
Member
Registered: Jul 2004
Posts: 332
Rep:
|
Ownership, group and premission changing problem
How do I change the ownership, group and the premission of files like:
Code:
lrwxrwxrwx 1 root root 41 Jan 28 07:20 default_pref -> ../../../../etc/squirrelmail/default_pref
If I try:
Code:
chown apache default_pref
chgrp apache default_pref
chmod 600 default_pref
Nothings happens!
Please help me!
|
|
|
05-07-2007, 08:28 AM
|
#2
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
Are you sure you are doing this as root?
Also make sure you first cd to the directory that contains the file you want to set permissions on.
|
|
|
05-07-2007, 08:35 AM
|
#3
|
Senior Member
Registered: May 2006
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
|
|
|
05-07-2007, 08:41 AM
|
#4
|
Member
Registered: Jul 2004
Posts: 332
Original Poster
Rep:
|
Yes I am root.
Quote:
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.
|
|
|
05-07-2007, 08:45 AM
|
#5
|
Member
Registered: Jul 2004
Posts: 332
Original Poster
Rep:
|
Hi bsdunix!
Quote:
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.
Last edited by gubak; 05-07-2007 at 08:46 AM.
|
|
|
05-07-2007, 09:21 AM
|
#6
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
chmod 775 /var/lib/squirrelmail/prefs?
|
|
|
05-07-2007, 09:28 AM
|
#7
|
Senior Member
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761
Rep:
|
Quote:
/var/lib/squirrelmail/prefs/ should be writable by user apache
|
chown apache /var/lib/squirrelmail/prefs?
|
|
|
05-07-2007, 04:39 PM
|
#8
|
Member
Registered: Mar 2006
Location: Plovdiv, Bulgaria
Distribution: OpenSuse 11.3
Posts: 55
Rep:
|
You need to change the permissions of the file the link points to.
|
|
|
05-08-2007, 01:23 AM
|
#9
|
Member
Registered: Jul 2004
Posts: 332
Original Poster
Rep:
|
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.
This problem happening at every user.
Does somebody have any ideas?
Thanks in advance!
Last edited by gubak; 05-08-2007 at 01:25 AM.
|
|
|
05-08-2007, 02:29 AM
|
#10
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
|
|
|
All times are GMT -5. The time now is 10:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|