If you want to use an external storage in Nextcloud, it needs to be accessible for the webserver user. For ubuntu/debian this is the often cited www-data user (other systems it can be users like httpd, http, www, …)
with sudo -u www-data ls -l /path/to/external you can check the permissions.
you need to fix the permissions that the webserver user can access the data. Make sure that on casaOS it is www-data (many use Debian/Ubuntu or other derivates and for them it is www-data).
Did you mean here: /DATA/AppData/nextcloud/var/www/html/ ?
The html folder with www-data as owner ?
Because that html folder already have that and with the USB pendrive connected, they both already have permissions of write and read but still didn’t work.
Just the USB path changed with /media/devmon/… but I tried with that and with the user name but nothing.
That is the main storage. With some luck it is the right user, what user is it currently?
This path needs to be accessible for the webserver user. And it needs to be through the whole folder structure, if the parent folders are not allowed for the webserver user it can’t see inside. Normally if you use the sudo -u webserver-user ls -lisa /path/to/folder if you see the listing, all the permissions are ok.
I don’t understand this, sorry. I tried to write that command but gave me errors like:
sudo: unkown user webserver-admin
sudo: error in initializing the audit plugin sudoers_audit
Is there any via GUI method for Linux Mint or Ubuntu ?
On Linux systems, there are more users (normally), e.g. the webserver runs with dedicated user permissions. With cat /etc/passwd, you can see all these users. If there is www-data is in this list, your webserver probably runs with this user’s permissions.
In my computer with Linux Mint right now there’s one user only (from Users and groups app) which is a custom account (not desktop user, not administrator).
With the command: sudo /etc/passwd I saw the www-data:
Ok, then the path to your pendrive (supposing it is /media/devmon/…), the folder should be readable with:
sudo -u www-data ls -lisa /media/devmon/…
use the full path, if you don’t have permissions, then the folder itself or the parent folders are not readable by www-data. If you use a GUI and you add a drive, it is associated with the GUI user by default (probably).
As admin you add external storage, type local? You define a name, then you select local, give the path and then specify the users who will be able to see the stroage?
If it does not work, you don’t get the green check at the left of the line in the GUI where you configured it? In this case, check the logfile for more information. The logfile is in your normal (not external) data folder with name nextcloud.log.
I tried one more time to create the USB external storage to Nextcloud, but watching on the log reader inside Nextcloud GUI (I used that because watching directly from nextcloud.log I didn’t understand), there is something like:
Generato da PDOException: SQLSTATE[HY000]: General error: 5 database is locked
If it is linked to other activities (client etc.), not sure about that. Do you use redis cache for filelocking (you should, especially if you read this message very often in the logs)?
The code 200 is good, no error.
For the locking, you can try to reduce other processes (mainly other clients connected).
I tried more than one time installing Debian 12 and with another installation of Nextcloud in CasaOS, and from logging of Nextcloud that’s the only error now:
OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: oc_user_status.user_id
/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php - line 328:OC\DB\Exceptions\DbalException::wrap([ "Doctrine\ … "])
/var/www/html/lib/public/AppFramework/Db/QBMapper.php - line 137:OC\DB\QueryBuilder\QueryBuilder->executeStatement()
/var/www/html/apps/user_status/lib/Listener/UserLiveStatusListener.php - line 104:OCP\AppFramework\Db\QBMapper->insert([ "OCA\User … l])
/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php - line 86:OCA\UserStatus\Listener\UserLiveStatusListener->handle([ "OCP\User … "])
/var/www/html/ocs/v1.php - line 64:OC\Route\Router->match(“/ocsapp/app … t”)
/var/www/html/ocs/v2.php - line 23:require_once(“/var/www/html/ocs/v1.php”)
Generato da Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: oc_user_status.user_id
/var/www/html/3rdparty/doctrine/dbal/src/Connection.php - line 1814:Doctrine\DBAL\Driver\API\SQLite\ExceptionConverter->convert([ "Doctrine\ … "], [ “Doctrine\DBAL\Query”])
/var/www/html/3rdparty/doctrine/dbal/src/Connection.php - line 1749:Doctrine\DBAL\Connection->handleDriverException([ "Doctrine\ … "], [ “Doctrine\DBAL\Query”])
/var/www/html/3rdparty/doctrine/dbal/src/Connection.php - line 1163:Doctrine\DBAL\Connection->convertExceptionDuringQuery([ "Doctrine\ … "], “INSERT INTO … )”, [ “admin”,"o … e], [ 2,2,1,5])
/var/www/html/lib/private/DB/Connection.php - line 295:Doctrine\DBAL\Connection->executeStatement(“INSERT INTO … )”, [ “admin”,"o … e], [ 2,2,1,5])
/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php - line 354:OC\DB\Connection->executeStatement(“INSERT INTO … )”, [ “admin”,"o … e], [ 2,2,1,5])
/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php - line 280:Doctrine\DBAL\Query\QueryBuilder->execute()
/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php - line 326:OC\DB\QueryBuilder\QueryBuilder->execute()
/var/www/html/lib/public/AppFramework/Db/QBMapper.php - line 137:OC\DB\QueryBuilder\QueryBuilder->executeStatement()
/var/www/html/apps/user_status/lib/Listener/UserLiveStatusListener.php - line 104:OCP\AppFramework\Db\QBMapper->insert([ "OCA\User … l])
/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php - line 86:OCA\UserStatus\Listener\UserLiveStatusListener->handle([ "OCP\User … "])