0

first of all I've already asked this question in the OwnCloud forum but I didn't get any answer, so I thought I'd try here as well.

I'm running OwnCloud 10.2 on a Lubuntu 18.04 LTS server (just an old laptop). I have 4 USB NTFS drives connected to that laptop that I wanted to use as storage for OwnCloud. Using Lubuntu SMB I can read/write onto those drives from another Windows computer on the network. When I try to add them to OC though, OC throws me an error and cannot find the path.

On the server itself one of the drives path is /media/user/PB. Using that path OC cannot find it. If I, instead, try to share the default Lubuntu Music folder, OC can do it with no issues (/home/user/Music).

https://pastebin.com/v9R3zt4X Here's the content of the OC log, probably there are some errors there that I don't know how to decypher.

Thank you.

EDIT: for the sake of clarity here are some more details.

Server: Operating system: Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

Kernel: Linux multimedia 4.18.0-22-generic #23~18.04.1-Ubuntu SMP Thu Jun 6 08:37:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Web server: Server version: Apache/2.4.29 (Ubuntu) Server built: 2019-04-03T13:22:37

Database: ii mariadb-client-10.1 1:10.1.40-0ubuntu0.18.04.1 amd64 MariaDB database client binaries ii mariadb-client-core-10.1 1:10.1.40-0ubuntu0.18.04.1 amd64 MariaDB database core client binaries ii mariadb-common 1:10.1.40-0ubuntu0.18.04.1 all MariaDB common metapackage ii mariadb-server 1:10.1.40-0ubuntu0.18.04.1 all MariaDB database server (metapackage depending on the latest version) ii mariadb-server-10.1 1:10.1.40-0ubuntu0.18.04.1 amd64 MariaDB database server binaries ii mariadb-server-core-10.1 1:10.1.40-0ubuntu0.18.04.1 amd64 MariaDB database core server files

PHP version: PHP 7.2.19-0ubuntu0.18.04.1 (cli) (built: Jun 4 2019 14:48:12) ( NTS ) Copyright © 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies with Zend OPcache v7.2.19-0ubuntu0.18.04.1, Copyright © 1999-2018, by Zend Technologies

ownCloud version: [ownCloud ] 10.2.0 (stable)

config.php for OC (sensitive data already removed)

So all I did was installing Lubutnu 18.04 first, then OC 10.2 following the guide on their website. I also have SMB running on Lubuntu, so to access the drives as LAN shares from my home network.

So far, only the SMB share is working.

  • Did you give OC permission to read/write to that specific location? – Dr_Bunsen Jun 20 at 9:14
  • That might be what I'm missing. could you please point me in the right direction? I'd have no idea how to. – vale.maio2 Jun 20 at 9:25
  • You could automount the USBs and pass owner ship to OC. Let me draft up an answer. – Dr_Bunsen Jun 20 at 9:34
  • Which error does Owncloud give you? – vidarlo Jun 20 at 13:18
  • @vidarlo no errors per se, on the folder page in the web admin area there is a square to the left of the folder you're setting up. It goes green if it was found and mounted, otherwise goes red. Mine is red. There is OC log in the OP if you can make anything out of it. I couldn't. – vale.maio2 Jun 20 at 13:24
1

OwnCloud(php / www-data) probably doesn't have the right to read/write to the location of the USBs. You could change the ownership of the location where they are mounted(assuming you dabbled in fstab to keep them mounted after a reboot) with

$ chown -R owner-user:owner-group directory

Where for owner-user and owner-group should be www-data. I am not sure if php is a member of this group by default, if it is not, use $ adduser php www-data to make php a member of www-data.

Note that giving write access to php is somewhat debatable, but this should make OwnCloud recognise and be able to use the USB sticks.

More about chown and chmod here

  • First of all thank you. It appears I dont have a php user from cut -d: -f1 /etc/passwd but I do have a www-data user. I then ran the chown -R www-data:www-data /media/vale/SAMSUNG/ command, no errors in SSH, restarted apache but no change, still cannot add that drive to OC. What am I missing? – vale.maio2 Jun 20 at 10:37
  • I couldn't tell you without all the relevant data. So in your question add: OS + version, what have you installed(php, apache etc), what OC requires and what steps you took to make this work. – Dr_Bunsen Jun 20 at 11:29
  • I've modified the original post with some comments, let me know if it's not enough. – vale.maio2 Jun 20 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.