This question about Installation of Foswiki: Answered

Revision control preventing editing

Hi,

I'm unable to edit pages.

I have turned on verbose logging via the sandbox and seeing errors like the following:

/usr/bin/rcs '-l' '/var/www-hosted/foswiki/data/ServiceDesk/W3F.txt'
/usr/bin/ci '-mnone' '-t-none' '-wuser1' '-u' '/var/www-hosted/foswiki/data/ServiceDesk/W3F.txt' -> , referer: https://domain.com/bin/edit/ServiceDesk/W3F?t=1370240526

When I run these commands via the cmd line it says the file is in use:

ci: RCS file /var/www-hosted/foswiki/data/ServiceDesk/W3F.txt,v is in use

I have attemped to resolve this by removing all lock files and ensuring permissions are correct.

This issue came about after moving the files to a new server.

If anyone can cast any light on this it will be greatly appreciated.

Thanks.

-- SunSeri - 05 Jun 2013

The locks status is set to

locks: root: 1.4

-- SunSeri - 05 Jun 2013

See if the instructions on how to unlock the RCS files resolves the issue.

See Support.Faq28

-- GeorgeClark - 05 Jun 2013

Thanks for the pointer, George.

I've been through these steps but sill getting the same errors.

The files seem to getting locked by root:

tlocked by: root

the files were copied from debian, where the default owner would have been www-data. Its now apache.

They would have been copied over as root and then chowned to apache.

Actually the root ownership has probably come about because I have run those commands on the command line.

Any other avenues I can investigate?

Thanks

-- SunSeri - 05 Jun 2013

So I've watched the RCS behavior and ran the commands manually from beginning to end as the Apache user. (I presume this is the user RCS will run under).

To start with it fails on step 3). So I updated the permissions of the file test.txt,V from 444 to 644.

Upon running the command in step 3) again I was met with the error that the file is locked. Running command 1) lists the owner now as Apache.

I have removed the lock files and ran the command in step 3) and I get the same permission denied error.

1)

sudo -u apache /usr/bin/rlog '-h' '/var/www-hosted/foswiki/data/test/test.txt'

completes successfully

2)

sudo -u apache /usr/bin/rcs '-l' '/var/www-hosted/foswiki/data/test/test.txt'

completes successfully:

RCS file: /var/www-hosted/foswiki/data/test/test.txt,v 1.9 locked done

3)

sudo -u apache /usr/bin/ci '-mnone' '-t-none' '-wuser1' '-u' '/var/www-hosted/foswiki/data/test/test.txt'

FAILS:

/var/www-hosted/foswiki/data/test/test.txt,v <-- /var/www-hosted/foswiki/data/test/test.txt Unable to create temp directory: Permission denied

-- SunSeri - 05 Jun 2013

Pretty sure its permissions.

Can run allthe commands sucesfully as root. Perhaps something to do iwith the masking set in LocalSite.cfg, in the RCS parts.

I have followed the instructions here to no avail:

http://foswiki.org/Support/SettingFileAccessRightsLinuxUnix

Any ideas appreciated. Ta

I'm pretty sure its a permissions issue. I'm starting to think it may be something to do with the mask settings in LocalSite as I have followed the instructions on this URL to no avail:

http://foswiki.org/Support/SettingFileAccessRightsLinuxUnix

Any ideas appreciated.

-- SunSeri - 05 Jun 2013

Ah ... make sure that RCS under the apache user is able to create files in the system temporary directory /tmp ...

What OS are you using now? Could you have SE Linux extensions enabled. That can block access even when unix file permissions would seem to allow it.

-- GeorgeClark - 05 Jun 2013

By the way, you might want to jump on the #foswiki channel on IRC and see if anyone is around who can help realtime. It might be faster to resolve the issue.

-- GeorgeClark - 05 Jun 2013

Thanks George, it turned out to be the /tmp dir as you pointed out.

Many thanks.

-- SunSeri - 06 Jun 2013

For the record the /tmp dir was owned by root with 755 permissions. I changed the permissions to 777.

-- SunSeri - 06 Jun 2013
 

QuestionForm edit

Subject Installation of Foswiki
Extension
Version Foswiki 1.0.5
Status Answered
Related Topics
Topic revision: r6 - 06 Jun 2013, SunSeri
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy