Page 1 of 1

Softlink directory don't have permission

Posted: 26 Oct 2015 01:56
by fizzgig656
Hi all. Just moved data about, new hdd and upgraded/new install of owncloud.
Installed and owncloud works fine. Created 2 Ln -s source destination. When I log back in to owncloud one of the 2 directories linked won't give me permissions to create or upload. But the other one will.
I've tried deleting and recreating. I've tried changing permissions to 777 www:www in the hope I'll find what's wrong.

And help please......I'm going mad

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 07:36
by raulfg3
you install onwcloud inside a jail?

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 08:10
by fizzgig656
Installed on embedded 10.2.0.2 no jail I believe. Downloaded .tar and copied extracted files into /mnt/Sdata/Services/owncloud/ changed owncloud to www:www -R and -R 775
My ln-s to data that doesnt give me permissions is on /mnt/Mdata/media
But the other small folder is on /mnt/4gbusb/

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 13:23
by raulfg3
difficult to help if you do your own install.

Why you do not use some of the [howto] in the forum like? :

viewtopic.php?f=48&t=6102

OR

viewtopic.php?f=79&t=9383

PD: I remember a problem to do softlinks between physical disk, please google a bit, and try hard-link instead.

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 13:30
by fizzgig656
can you hard link directories? did try looking but im not that good with commands ln on its own didnt work, i will look at the above. thanks.

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 13:47
by spy0r
why don't you just add theese folders within owncloud as "external storage"? i did that in my installation and everything works fine... or do i get it wrong?

https://owncloud.org/features/

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 14:40
by fizzgig656
spy0r wrote:why don't you just add theese folders within owncloud as "external storage"? i did that in my installation and everything works fine... or do i get it wrong?

https://owncloud.org/features/
no your probably not, i tried so manty installs and re installs and upgrasdes over the weekend getting various error/nickups, i did try external storage but cant remember why i didnt stick with it. ill ahve to relook.

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 14:48
by spy0r
just make sure the folders are accessable from the user www (maybe as owner) and add them in the owncloud administrator tab within "external storage" - you have to enable external storage first in the "Apps".

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 15:07
by fizzgig656
raulfg3 wrote:difficult to help if you do your own install.

Why you do not use some of the [howto] in the forum like? :

viewtopic.php?f=48&t=6102

OR

viewtopic.php?f=79&t=9383

PD: I remember a problem to do softlinks between physical disk, please google a bit, and try hard-link instead.
Ive used the first link above, but didnt do the php packages (another weblink in above link) as it states i shouldnt need to install in 9.1 and above . IT doesn't mention how to add links and change data files location.

is it best to use external storage or ln -s, I though just ln was for files only.
When i set up my last owncloud i was advised to use the ln-s and ti worked, but now ive chaned about and reinstalled everything,

ln -s /mnt/Mdata/Media /mnt/Sdata/Services/webserver/data/user1/files

works and displays in /files/ as

Code: Select all

drwxr-xr-x  2 www   www   3 Oct 26 13:52 Documents
lrwxr-xr-x  1 root  www  16 Oct 26 14:10 Media -> /mnt/Mdata/Media
drwxr-xr-x  2 www   www   5 Oct 26 13:52 Photos
but when i log into owncloud it doesnt display.

im sure its something im just going wrong, all i want to do is ass my data directory into owncloud (ideally keeping them separate? as there on separate drives, then i can share them with 2-3 other users from the admin user in owncloud.

do the users i setup in owncloud need to match N4F users?

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 15:42
by spy0r
i didn't do anything with links... i first only had samba and some shares, then i wanted to share my data via owncloud too. I changed the owner of this folders to www and managed samba access via the groups. I added ACLs (inherited, user:www) so owncloud has direct read/write access when a file or folder is created via samba.
fizzgig656 wrote: do the users i setup in owncloud need to match N4F users?
no, owncloud just needs the permissions for the www user. The owncloud users are set on top of that, you have to make sure in the administration page (my suggestion external storage) which owncloud user is allowed to access which "external" folder

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 16:41
by fizzgig656
ok will have a look and play. Main reason I'm install a fresh is I'm moving from owncloud 4.5 to 8. Can you still play mp3's? What about videos?

what about admin page warnings. not looked into it yet as i wanna get it up and working first but i will need to? or do i?

php does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.
Please check the installation documentation ↗ for php configuration notes and the php configuration of your server, especially when using php-fpm.

This server has no working Internet connection. This means that some of the features like mounting external storage, notifications about updates or installation of third-party apps will not work. Accessing files remotely and sending of notification emails might not work, either. We suggest enabling the Internet connection for this server.
The "Strict-Transport-Security" HTTP header is not configured to least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our security tips.

Re: Softlink directory don't have permission

Posted: 26 Oct 2015 19:36
by spy0r
fizzgig656 wrote:ok will have a look and play. Main reason I'm install a fresh is I'm moving from owncloud 4.5 to 8. Can you still play mp3's? What about videos?
yes, there are apps for music and video (but not every codec for sure).
fizzgig656 wrote:what about admin page warnings. not looked into it yet as i wanna get it up and working first but i will need to? or do i?
i have 2 warnings on the admin page: php variable and php cache, but i can deal with it right now.
fizzgig656 wrote:The "Strict-Transport-Security" HTTP header is not configured to least "15768000" seconds. For enhanced security we recommend enabling HSTS as described in our security tips.
Put this in the aux parameters of your webserver to get rid of that message:

Code: Select all

server.modules += ( "mod_setenv" )
$HTTP["scheme"] == "https" {
    setenv.add-response-header  = ( "Strict-Transport-Security" => "max-age=63072000; includeSubdomains; preload")
}

Re: Softlink directory don't have permission

Posted: 27 Oct 2015 00:15
by fizzgig656
in addition to above. is there an alternative or better webserver than owncloud for nas4free? And why would it be better to install owncloud into a jail. Why is jail better? Is there issues with embedded installs? I know it sound dum asking. Last time jails were manual and complicated installs (for a user like me) but I believe you can get easier ones to install now?

Re: Softlink directory don't have permission

Posted: 27 Oct 2015 20:13
by spy0r
i don't know what "better" should be - what should be "better" when everything works? performance? security? there are many tuning options, but the biggest to tweak with is your provider data connection... and because of security - read the owncloud administration guide incl. hardening servers if you are afraid...

why don't you try to get owncloud to work with the smallest effort, to see if that is suitable for your claim:
-> use the build in webserver (lighttbd)
-> use https
-> paste the data directory out of the webserver directory (even if you want to work with other folders)
-> manage users in owncloud (administration page)
-> make your folders accessable by the user www (chown -R www:group /folder)
-> add theese folders in the administration page within external storage and map them to your users
-> do some tweaks to get rid of the admin page errors (look at my last post)
-> USE OWNCLOUD AND DO A LOT OF TESTING!!!!!

Re: Softlink directory don't have permission

Posted: 28 Oct 2015 01:15
by fizzgig656
Ok fair enough. Limited knowledge is bad I understand that (me). I'll have to have a look at lighttbd I've not looked at that or found out how to use it.
Have you installed owncloud in a jail?
I did add the external drives within admin. All ok. Shared them. Not sure if I have or how yo change one users permissions to the share as in granting read or write or more importantly stop deleting. I'll have to dig and play.
I did install music app which wouldn't scan the shared folder. But would scan the admin account.

Re: Softlink directory don't have permission

Posted: 28 Oct 2015 08:15
by spy0r
lighttbd is the NAS4FREE built in webserver - owncloud is the "php-website" on that webserver.

this constellation has nothing to do with jails!

Re: Softlink directory don't have permission

Posted: 28 Oct 2015 23:30
by fizzgig656
why do people decide/advise putting owncloud into a jail?

As I said above i really am a novice and some areas ive not even touched on so am very green, - i know this causes pain to other (experts etc) why we ask silly questions. Jails is one of them.

Re: Softlink directory don't have permission

Posted: 29 Oct 2015 09:46
by spy0r
For security!
https://en.wikipedia.org/wiki/FreeBSD_jail
Security
For example, in a non-jailed system, a web server running as user www that introduces a PHP-include vulnerability would compromise the entire system: the attacker would have the rights of the user www which can typically modify files on the web server, wander about in the directory tree and get lots of information, such as the full user list, shell and home directory from /etc/passwd.
But if the web server is jailed, the scope of user www is limited to the jail, which in turn can be minimalistic enough not to give away very much. Even if the attacker gained access to the jail's superuser account, he/she could only modify that jail, and not the whole system.
That doesn't mean owncloud NOT within a jail is completely insecure, but you should look after the security warnings in the owncloud administration manual

Re: Softlink directory don't have permission

Posted: 29 Oct 2015 12:33
by fizzgig656
Ok. Thanks for the pointer. I see why jails are suggested. Thanks