Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning message when browse repository with svnadmin #8

Closed
chjq68 opened this issue Aug 3, 2024 · 4 comments
Closed

warning message when browse repository with svnadmin #8

chjq68 opened this issue Aug 3, 2024 · 4 comments
Assignees

Comments

@chjq68
Copy link

chjq68 commented Aug 3, 2024

message as following in top of broser:
(/usr/bin/svn error=svn: warning: W000013: Can't open file '/root/.subversion/servers': Permission denied
)

"/usr/bin/svn" ls --xml --non-interactive --trust-server-cert file:///data/repositories/doc/

what's the problem?
(I configured open ldap auth for svnadmin)

image

@userid0x0
Copy link
Owner

Hi,
I need to apologize for the delay. I never used LDAP so far, I can try to reproduce the problem the next days.
Without LDAP I haven't seen this behavior.
Did you do any special bind-/volume-mounts?

@chjq68
Copy link
Author

chjq68 commented Sep 2, 2024

I use bindfs to mount reository fold for use of redmine, this is the file /etc/fstab:
/data/autoit/data/svn2/data/repositories /data/autoit/data/redmine511/repos-svn fuse.bindfs rw,force-user=0,force-group=0 0 0

then load for redmine in docker-compoe file:
redmine511:
......

  • '../data/redmine511/repos-svn:/usr/src/repos-svn:ro'

    svn-server:
    image: 'userid0x0/svn-docker:v3.19'
    hostname: 'svn.co-think.com'
    restart: 'always'
    environment:
    SVN_SERVER_REPOSITORIES_URL: "/svn"
    WEBSVN_URL: "/websvn"
    WEBSVN_AUTH: "2"
    SVN_SERVER_REPOS_STYLE_AUTH: "2"

    volumes:
    - '../data/svn2/data:/data'
    ports:
    - '3690:3690'
    - '8081:80'

To make LDAP work, I pachted manually as:
mfreiholz/iF.SVNAdmin#137
(I'm not sure wether this problem is related with LDAP).

userid0x0 added a commit that referenced this issue Oct 2, 2024
Triggered by GH-8 I discovered the following problem, already part of the intial version by elleflorio et al.
* apache2 runs as user `apache`
* svnserver runs as user `svn`
* the CGI-BIN Environment for Php has a wrong HOME variable set - derived from s6-service
.
Apache runs now as user `svn`, group `svnusers`. User `apache` is no longer used.
Thus the `chmod 777` calls are now longer required. Instead `chown svn:svnusers` is applied to the folders in `/data`.
@userid0x0
Copy link
Owner

userid0x0 commented Oct 2, 2024

Hi,
it took me a while to find time. Basically the Apache webserver used the Environment of the root user which runs the s6 system. Thus User apache tried to access $HOME/.subversion -> /root/.subversion/... .
I changed a couple of more things and removed the user apache completely and use user svn instead. Actually this would open the possibility to enable ENV vars like UID/GID as for other images.

Feel free to perform a test.

@userid0x0 userid0x0 self-assigned this Oct 2, 2024
@userid0x0
Copy link
Owner

Hi,
there is a new tag v3.20-lsio which uses the linuxserver.io image as a basis. Thus it's now possible to set the UID/GID to be used within the container.
Feel free to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants