Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] multimon.cgi - getting to work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sat Sep 15, 2012 5:54 am    Post subject: [SOLVED] multimon.cgi - getting to work Reply with quote

I've apcupsd build with 'cgi" flag and the "multimon.cgi" now is in directory:
/usr/libexec/apcupsd/cgi-bin/

So I have created a symlink to my apache cgi-bin:
Code:
ln -s /usr/libexec/apcupsd/cgi-bin/multimon.cgi /var/www/localhost/cgi-bin
but I'm getting permission error:
Code:
You don't have permission to access /cgi-bin/multimon.cgi on this server.


I've changed permission of multimon.cgi to "apache"
Code:
ll /usr/libexec/apcupsd/cgi-bin/
total 100
-rwxr-xr-x 1 apache apache 27440 Sep 14 23:38 multimon.cgi
but symlink is owned by "root" what am I doing wrong?

Last edited by Joseph_sys on Tue Apr 30, 2013 3:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sat Sep 15, 2012 6:32 am    Post subject: Reply with quote

When I copied all cgi related file from:
/usr/libexec/apcupsd/cgi-bin/

to:
/var/www/localhost/cgi-bin

it works. Why doesn't it work via symlink?
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Sat Apr 27, 2013 7:51 pm    Post subject: Reply with quote

Try to make a physical link instead!

Code:
ln -P /usr/libexec/apcupsd/cgi-bin/multimon.cgi /var/www/localhost/cgi-bin/


:wink:
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Tue Apr 30, 2013 3:16 pm    Post subject: Reply with quote

fbcyborg wrote:
Try to make a physical link instead!

Code:
ln -P /usr/libexec/apcupsd/cgi-bin/multimon.cgi /var/www/localhost/cgi-bin/


:wink:


Thanks, yes this worked as well.
Will the files in "/var/www/localhost/cgi-bin/" get updated with a next "apcupsd" upgrade?
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Tue Apr 30, 2013 3:36 pm    Post subject: Reply with quote

Joseph_sys wrote:


Thanks, yes this worked as well.
Will the files in "/var/www/localhost/cgi-bin/" get updated with a next "apcupsd" upgrade?

I think so. As a consequence of the physical link. You can even try yourself using a text file, creating a physical link to it in another directory and modifying the original one. If the destination is modified too, then the answer to your question is yes! ;)
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
hdcg
Tux's lil' helper
Tux's lil' helper


Joined: 07 Apr 2013
Posts: 119

PostPosted: Tue Apr 30, 2013 4:11 pm    Post subject: Reply with quote

Hi,

Apache's FollowSymLink Option directive controls whether apache follow symbolic links or not.

See http://httpd.apache.org/docs/2.2/mod/core.html#options for details.

Best Regards,
Holger
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Tue Apr 30, 2013 4:28 pm    Post subject: Reply with quote

Thank you, yes I think this was my problem:
Code:
<Directory "/var/www/localhost/cgi-bin">
   AllowOverride None
   Options None
   Order allow,deny
   Allow from all
</Directory>

Changing it to: Options -Indexes FollowSymLinks
solved the problem.

So it works either way enable in apache "FollowSymLinks" or create a "Hard Link"
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Wed May 01, 2013 8:26 am    Post subject: Reply with quote

Good to know that. I didn't know about the FollowSymlinks option.
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum