Tags:
create new tag
, view all tags

Question

I have the following error from my Configure under LogFiles? .

1) {WarningFileName} = /var/www/twiki/data/warn%DATE%

Error
/var/www/twiki/data/ is not writable Though I have the following permission for this directory drwxr-xr-x 25 1000 users 4096 May 15 07:11 /var/www/twiki/data and I have pruposely set the permission to 777 for the above file.
2) {LogFileName} = /var/www/twiki/data/log%DATE%
Error
/var/www/twiki/data/ is not writable Though I have the following permission for this directory drwxr-xr-x 25 1000 users 4096 May 15 07:11 /var/www/twiki/data and I have pruposely set the permission to 777 for the above file.

Any idea why this keeps complaining?

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: CentOS? Linux, Release: 2.6.18-53.1.19.el5
Web server: Apache/2.2.3
Perl version: 5.8.8
Client OS: Windows
Web Browser: Firefox 3.0
Categories: Installation

-- KarunNithi - 08 Jul 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

It complains because the directory /var/www/twiki/data is not writeable by the web server's user id. TWiki will try to use new log files per month, so even if you set a permission of 777 to the current month's log file, it will fail to open a log file for next month. To do so, the web server's user id needs write permission to /var/www/twiki/data. If, however, you do not use a %DATE% construct in your log file name and always are using a fixed file name, you may safely ignore this warning.

-- HaraldJoerg - 08 Jul 2008


Dear Harald,

Thanks for the reply. But I have the following ownership for this directory:

drwxr-xr-x 25   1000 users    4096 May 15 07:11 /var/www/twiki/data

So should this be owned by apache?

I see some of the directories are owned by apache:apache whereas some are owned by 1000:users as shown below.

$ cd /var/www/twiki
 
$ ls -lat

drwxr-xr-x  4   1000 users        4096 Jul  7 20:07 lib

drwxr-xr-x  2   1000 users      12288 Jul  7 18:35 templates

drwxr-xr-x  2   1000 users        4096 Jul  7 18:35 tools

drwxr-xr-x 12   root   root        4096 Jul  7 18:29 .

drwxr-xr-x  3    apache apache   4096 Jun 30 13:24 bin

drwxr-xr-x  7    root   root        4096 May 21 19:26 ..

drwxrwxr-x  2   apache apache   4096 May 21 19:26 extras

drwxr-xr-x  2    apache apache   4096 May 21 19:26 locale

drwxr-xr-x  5    apache apache   4096 May 21 19:26 working

drwxr-xr-x 25   1000 users        4096 May 15 07:11 data

drwxr-xr-x 24   1000 users        4096 May 15 07:11 pub

-- KarunNithi - 09 Jul 2008

/var/www/twiki/data and /var/www/twiki/pub and all their subdirectories should be owned by apache:apache, whereas /var/www/twiki/bin would better be owned by some system administrator. A numerical uid of 1000 which does not correspond to a login name is considered a security hazard in traditional Linux environments because at some day in the future someone might add a login with exactly that uid. The new login would then own parts of your TWiki code.

For a detailed guideline on how to get access rights right, read TWiki.SettingFileAccessRightsLinuxUnix.

-- HaraldJoerg - 11 Jul 2008

I changed the ownership as apache:apache and the problem vanished.

-- KarunNithi - 11 Jul 2008

 
Change status to:
Topic revision: r6 - 11 Jul 2008 - 15:45:55 - KarunNithi
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback