Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploaded files are removed on export #292

Open
v-p-b opened this issue Sep 2, 2022 · 0 comments
Open

Uploaded files are removed on export #292

v-p-b opened this issue Sep 2, 2022 · 0 comments

Comments

@v-p-b
Copy link

v-p-b commented Sep 2, 2022

Describe the bug

The plugin just deleted all contents of the wp-content/uploads directory...

Steps to reproduce the behavior

I'm using WordPress as packaged in Debian Bullseye. I suspect symlinks are part of the problem, here are the relevant ones:

/var/www/myblog -> /usr/share/wordpress

/usr/share/wordpress/wp-content/uploads -> /var/lib/wordpress/wp-content/uploads

I used the plugin downloaded from wordpress.com (version 2.3.6), installed by uploading the .zip.

Deletion occurs when I initiate an export. The generated .zip doesn't contain any media. The temporary directory created by the plugin contains a symlink to uploads (the tmp directory is not removed by the plugin either). I think the files are removed during cleanup(), because the delete operation follows the symlink.

$ ls -la /tmp/wp-jekyll-e5e17674045d5c460e7cf3aa4f137f01/wp-content/
total 2
drwxr-xr-x 2 www-data www-data 1024 Sep  2 08:23 .
drwxr-xr-x 3 www-data www-data 1024 Sep  2 08:23 ..
lrwxrwxrwx 1 www-data www-data   37 Sep  2 08:23 uploads -> /var/lib/wordpress/wp-content/uploads

Expected behavior

The plugin doesn't delete files.

Screenshots

N/A

Additional context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant