YunoHost-Apps / dolibarr_ynh

Dolibarr ERP & CRM is a modern software to manage your organization's activity. This is an integration of Dolibarr in YunoHost
https://www.dolibarr.org/
GNU Affero General Public License v3.0
12 stars 18 forks source link

installing Dolibarr changed folder ownership #75

Closed Oni-Shadow closed 2 years ago

Oni-Shadow commented 2 years ago

Describe the bug

my /media/Data folder and sub-folder owneship changed to Dolibarr:Dolibarr

Context

My YunoHost server

Hardware: : MacbookAir YunoHost version: 4.3.6.2 I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no - Some docker container installed but should not interfere

Description of my issue

Hi, I opened a topic in yunohost forum, but I guess here is a better place. I discovered the issue trying to sync joplin thanks to my nextcloud. I had the error :

Last error: Error: DELETE locks/1_1_0f5a643a6edb41548f543321abf6b864.json: (Exception Sabre\DAV\Exception\Forbidden) (403): <?xml version="1.0" encoding="utf-8"?> <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> <s:exception>Sabre\DAV\Exception\Forbidden</s:exception> <s:message/> </d:error>

I thought it was a nextcloud issue base on the error and initial googling. In fact, the lock table was empty and it was just the file itself that could not be removed, (yes, you should have better read the error message). I tried to delete the /media/Data/AppData/Joplin_notes/locks/1_1_0f5a643a6edb41548f543321abf6b864.json using the nextcloud web interface, I could not. :arrow_forward: it happened to be a permission issue again. And I have not fixed it yet as I am unsure how to handle it safely.

Right after I failed at upgrading nextcloud I have installed #dolibarr an ERP/CRM as I wanted to start some personal business. On my nextcloud installation, I have an External hard drive connected for additional space which is mounted in /media/Data. This is where most of my files are located --including Joplin Notes

After Dolibarr's installation, all the /media/Data ownership changed to Dolibarr:Dolibarr. Not sure whether permissions changed. This is why, the lock file cannot be removed, nextcloud does not have the permission anymore !

So I assumed that just installing Dolibarr changed the owneship as I did not do anything myself. In dolibarr itself, I added a third parti, changes some masks for numbering and that's it.

Does dolibarr expect a /media/Data folder for its own use ?

Steps to reproduce

not able to test on another instance.

Expected behavior

A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.

Logs

not sure what to provide

mastereur commented 2 years ago

Hello,

I can't understand how the installation of dolibarr could change the permissions of the /media/Data folder. The only permissions change is included for

chmod 750 "$final_path" (/var/www/$app)
chmod -R o-rwx "$final_path" 
chown -R $app:www-data "$final_path"

chmod 644 "$final_path/htdocs/conf/conf.php"
mkdir -p "$datadir" (datadir=$final_path/documents)
chown -R $app: "$datadir
chmod go-w $datadir

I also have 2 external USB hard drives on my server and I have never had any problem with permissions.. For precision, the disks are in NTFS (package ntfs-3g required) and mounted automatically by nano /etc/fstab with UUID=XXXXXXXXXXXX /media/STOCKAGE ntfs-3g rw,suid,dev,exec,auto,user,async,nofail 0 0

Translated with www.DeepL.com/Translator (free version)

mastereur commented 2 years ago

no activity since my answer