LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 11-04-2016, 10:25 AM   #31
redssr
Member
 
Registered: Oct 2013
Location: Dist Nasik MH State Country India
Distribution: Linux
Posts: 111

Original Poster
Rep: Reputation: Disabled

Hello ember1205

Code:
linux:~ # mount
sysfs on /sys type sysfs (rw,relatime)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=504860k,nr_inodes=126215,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
/dev/sda1 on / type ext3 (rw,relatime,data=ordered)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
Regards.

Redssr
 
Old 11-04-2016, 10:29 AM   #32
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Try adding -SymLinksIfOwnerMatch to the Apache configuration for your directory. Restart Apache.
 
Old 11-04-2016, 10:45 AM   #33
redssr
Member
 
Registered: Oct 2013
Location: Dist Nasik MH State Country India
Distribution: Linux
Posts: 111

Original Poster
Rep: Reputation: Disabled
Hello ember1205,

Please find the below details

1) Apache configuration changes
Code:
linux:~ # cat /etc/apache2/conf.d/owncloud.conf
Alias /owncloud "/srv/www/htdocs/owncloud/"

<Directory "/srv/www/htdocs/owncloud">
    Options All -SymLinksIfOwnerMatch
    AllowOverride All

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

    SetEnv HOME /srv/www/htdocs/owncloud
    SetEnv HTTP_HOME /srv/www/htdocs/owncloud


</Directory>

<Directory "/srv/www/htdocs/owncloud/data/">
  # just in case if .htaccess gets disabled
  Require all denied
</Directory>

## Please enable this manually, if needed. See also
## https://doc.owncloud.org/server/8.2/admin_manual/issues/index.html#apple-ios
# Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
# Redirect 301 /.well-known/caldav  /owncloud/remote.php/caldav

<Directory "/srv/www/">
    Options All -SymLinksIfOwnerMatch
    AllowOverride All

    <IfModule mod_dav.c>
      Dav off
    </IfModule>
</Directory>
2) Syntax checking and restarting apache

Code:
 apache2ctl configtest
which: no w3m in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/games)
which: no lynx in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/games)
AH00557: httpd2: apr_sockaddr_info_get() failed for linux
AH00558: httpd2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
linux:~ # cat > /var/log/apache2/error_log
^C
linux:~ # service apache2 stop
linux:~ # service apache2 start
3) Logs in apache

Code:
linux:~ # tail -f /var/log/apache2/error_log
[Fri Nov 04 15:39:45.034686 2016] [mpm_prefork:notice] [pid 2103] AH00170: caught SIGWINCH, shutting down gracefully
AH00557: httpd2-prefork: apr_sockaddr_info_get() failed for linux
AH00558: httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[Fri Nov 04 15:39:49.548948 2016] [ssl:warn] [pid 2163] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Nov 04 15:39:49.554057 2016] [mpm_prefork:notice] [pid 2163] AH00163: Apache/2.4.10 (Linux/SUSE) PHP/5.6.1 OpenSSL/1.0.1k-fips configured -- resuming normal operations
[Fri Nov 04 15:39:49.554132 2016] [core:notice] [pid 2163] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND'


[Fri Nov 04 15:39:57.490629 2016] [core:error] [pid 2182] [client 192.168.1.101:34268] AH00037: Symbolic link not allowed or link target not accessible: /srv/www
[Fri Nov 04 15:39:57.683611 2016] [core:error] [pid 2182] [client 192.168.1.101:34268] AH00037: Symbolic link not allowed or link target not accessible: /srv/www, referer: http://192.168.1.102/owncloud/
Overall result : no effect.

Regards,

Redssr
 
Old 11-04-2016, 04:21 PM   #34
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,169
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
Originally Posted by redssr View Post
If i change from srv to ssr it works but its not my requirement, i want it to work with srv only.
I don't see any difference since /ssr is on the same filesystem as /srv. Just move everything under /ssr to /srv and you'll be ok.

Quote:
linux:~ # ls -lrth /
total 88K
drwxr-xr-x 2 root root 4.0K Sep 25 2014 home
drwxr-xr-x 2 root root 4.0K Sep 25 2014 selinux
<snip>
I see a selinux directory. Are you by any chance using SELinux instead of Apparmor?

Last edited by bathory; 11-04-2016 at 04:32 PM.
 
Old 11-05-2016, 03:43 AM   #35
redssr
Member
 
Registered: Oct 2013
Location: Dist Nasik MH State Country India
Distribution: Linux
Posts: 111

Original Poster
Rep: Reputation: Disabled
Hello bathory,

The selinux directory is empty.

Code:
linux:~ # ls -larth /selinux/
total 8.0K
drwxr-xr-x  2 root root 4.0K Sep 25  2014 .
drwxr-xr-x 24 root root 4.0K Oct 31 15:17 ..
Regards,
Redssr
 
Old 11-05-2016, 08:55 AM   #36
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,169
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
I don't see any difference since /ssr is on the same filesystem as /srv. Just move everything under /ssr to /srv and you'll be ok.
You still don't answer why you're using /ssr instead of the default /srv. Your problem will stop if you do that.


Quote:
The selinux directory is empty.
Doh. I'm not familiar with suse, but since your apache config looks correct, I'm starting to believe that there is some sort of security measure involved. If it isn't Apparmor, it could be SELinux. I also don't know what means the empty /selinux. To see if it's enabled run:
Code:
sestatus -v
 
Old 11-05-2016, 09:27 AM   #37
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Quote:
Originally Posted by bathory View Post
You still don't answer why you're using /ssr instead of the default /srv. Your problem will stop if you do that.
I want to understand this, too. It's on the same disk, just a different parent directory. What in the world is the point of that?

I also had suggested changing the links and never saw feedback on doing so.
 
Old 11-05-2016, 11:53 AM   #38
redssr
Member
 
Registered: Oct 2013
Location: Dist Nasik MH State Country India
Distribution: Linux
Posts: 111

Original Poster
Rep: Reputation: Disabled
Dear ember1205,

I apologies, i totally forgot to reply regarding to your points.

Quote:

Originally Posted by bathory View Post
You still don't answer why you're using /ssr instead of the default /srv. Your problem will stop if you do that.
My problem is If i change the dir from /srv to /ssr in config file, the apache gets started but my app is unable to write on that dir. I already tested this. When i change the dir to /ssr my online editing of files in owncloud does not works. The files does not get edited. I even tried by giving 777 recursive permission to /ssr folder. But if i keeps /srv folder (which is an default webroot folder of apache in suse my app works fine without any problem.

Hence I am trying to keep my data in /ssr and make symlink to /srv. Currently these both folders lies on same partition but when my symlink will work my /ssr will lie on diff hdd as my actual data is of around 200GB which my VM does not has. its just of 32GB.

I hope you understand my problem, why i am focusing more on symlink.

Regards,

Redssr
 
Old 11-05-2016, 11:58 AM   #39
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Then your app is using the wrong user to run as - set it to run as the wwwrun user.
 
Old 11-05-2016, 12:14 PM   #40
redssr
Member
 
Registered: Oct 2013
Location: Dist Nasik MH State Country India
Distribution: Linux
Posts: 111

Original Poster
Rep: Reputation: Disabled
Dear ember1205,

I already tried your suggestion but it wont worked. Even I also tried by setting the same as of /srv folder structure but no luck, hence i am trying this last option of symlink

Regards,

Redssr
 
Old 11-05-2016, 01:03 PM   #41
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
You have a permissions issue that you believe you can solve by using a symbolic link. In the end, you put yourself into a scenario where you have another permissions issue.

My suggestion is that you bring this up with the OwnCloud forums instead of creating a non-standard configuration on the SUSE box and then figuring out why that doesn't work.
 
Old 11-05-2016, 01:07 PM   #42
redssr
Member
 
Registered: Oct 2013
Location: Dist Nasik MH State Country India
Distribution: Linux
Posts: 111

Original Poster
Rep: Reputation: Disabled
Dear ember1205,

I liked your suggestion, I will go to owncloud forum and try to solve my problem.

Thanks all of you who had tried very hard to solve my problem.

Regards,

Redssr
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] symlink to symlink confusion, Reprovo Linux - Newbie 2 11-18-2014 02:17 PM
Method Not Allowed: The requested method POST is not allowed for the URL /writedhcp.p WiWa Linux - Networking 15 01-06-2011 01:20 PM
Question How to get stat() of symlink and not of target of symlink ? ronbarak Programming 3 11-08-2010 12:14 PM
Tracking user logins that was allowed and not allowed eswanepoel Linux - Security 3 08-02-2006 04:37 AM
SlackWare :Method Not Allowed The requested method POST is not allowed for the URL slack31337 Linux - Software 0 04-08-2006 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 04:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration