Open srgrbkl opened 3 years ago
I'm having exactly the same issue. Fresh VM install with CE 2.4.2. Any hints?
I'll take a look in few minutes.
Ok, so this is related to this line: vendor/magento/framework/Filesystem/Driver/File.php::524 : Magento try to apply permission right after image creation.
On NFS mount, all permissions are forced to "u=rwx:g=rwx:o=rwx" with bindfs. I'll try to disable bindfs and run installation with normal permissions.
I made some change, can you confirm that everything is working on develop branch ?
If it's fine I'll merge into master.
tested develop branch with options: mount: 'rsync' path: 'root' provision: 'all'
get error: (failed)net::ERR_CONNECTION_REFUSED
I took my existing VM, shut it down, used your modified Vagrantfile and run 'vagrant up' again and it's working perfectly. I kept in my config the NFS mount. Although when I started investigating the issue I faced a lot of problems with the CSP module on Magento and had to disable it.
@AlexRoig Good news ! Thanks for testing.
@srgrbkl bindfs looks like mandatory for rsync mount, I'm investigating.
You can retry with a simple vagrant reload
@srgrbkl, rsync should work correctly this time.
If you have an issue on first launch, run bin/magento setup:upgrade
&& permission
.
@zepgram tested develop branch and its works fine now
We have same problem with magento 2.4.3 inside pagebuilder:
main.CRITICAL: The permissions can't be changed for the "/home/vagrant/magento/pub/media/wysiwyg/oks-hero.jpg" path. Warning!chmod(): Operation not permitted. [] []
I used this code with and without Vagrantfile and both not working, also permission command does not fix it.
config.bindfs.default_options = { force_user: 'vagrant', force_group: 'www-data', perms: 'u=rwx:g=rwx:o=rx' }
Well I tried it and it seems ok:
Could you describe what you did ? What is your mount configuration (default / rsync / nfs) ?
we use nfs -> in the pagebuilder use the image upload (from own computer)
We fixed it by disable in vagrantfile
#config.bindfs.bind_folder guestDirectory, guestDirectory, after: :provision
and using command on host
vagrant plugin uninstall vagrant-bindfs
I'll take a look to find a solution, bindfs is supposed to be required to avoid issues with permissions while using NFS mount.
I did this commit a long time ago : https://github.com/zepgram/magento2-fast-vm/commit/3b9e9e573633c481e41a20d3a865ff40b451504a
But this was creating an issue with RSYNC mount.
I'm trying to upload images of product but I get an error(tested in m2.4.2): 'A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.' system.log: main.CRITICAL: The permissions can't be changed for the "/home/vagrant/magento/pub/media/tmp/catalog/product/u/n/u.jpg" path. Warning!chmod(): Operation not permitted. [] []