• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Bulk Importing - What is the proper way to add files to /importing? User permissions problems

newmissions

Chevereto Member
Working on importing photos to Chevereto.
My problem is with file permissions.
- With root SFTP account, I upload photos to ./importing/parse-users (Any of the parse options work the same)


- If I run the CLI command sudo -u www-data php /var/www/html/cli.php -C importing (from the Dashboard->Bulk Importer)
I get errors where Chevereto can't delete the photos from the importing directory, as they're owned by root.

- If I run the CLI command without the sudo (while logged in as root) php /var/www/html/cli.php -C importing
Import runs correctly. Imports the albums/photos, then deletes them from the importing directory

However
Chevereto then can't delete the albums/photos due to permissions, as the imported photos were created/'owned' by root. (since I didn't run the CLI as sudo -u www-admin)

So one way I can't import them, the other way I can't delete (and presumably otherwise modify them)

...

I'm experienced on Windows and MacOS, but my linux permissions skills are lacking. I tried various ways to change the file/directory permissions but haven't been able to figure it out.

I tried adding a linux user imguploader (not a chevereto user) and putting that user in the www-data group.
I then sftp'd the test album to importing with rwx group permissions set for the www-data group.

(The thinking was, www-data user is in the www-data group. So if I give www-data group write permissions, it could import then delete the files.)
I then run the cli importer as sudo -u www-data ...
That didnt work. I get other permissions errors:
1639599749 - [Thread #0] About to parse image: /var/www/html/importing/parse-users/newmissions/C04906/C04906-(2019-12-03)_SP.jpg
1639599749 - [Thread #0] Using DB lock for content context data (id and type)
1639599750 - [Thread #0] Failed to insert image, exception thrown: file_put_contents(/tmp/chvtempHE2HKa): failed to open stream: Permission denied
1639599750 - [Thread #0] Adding "errors" flag to import row

I'm just unclear how this is supposed to be setup. I must be missing something simple. Can't find any threads on the community with similar issues.
(I am getting good at rebuilding the linode server from scratch though...)

Thanks for any pointers.
 
Solution
I figured it out. Realized going to work today that I'm on an actual server, so I can do what I want.
One recursive chown command latter and all the uploaded albums are owned by www-data! Made a script to do chown on the importing directory and then run the chevereto import script.

Thanks,
Seth
I figured it out. Realized going to work today that I'm on an actual server, so I can do what I want.
One recursive chown command latter and all the uploaded albums are owned by www-data! Made a script to do chown on the importing directory and then run the chevereto import script.

Thanks,
Seth
 
Solution
Back
Top