0

I asked the same question a while ago on the stackoverflow site, with no results. As it clearly has something to do with configuration of our Synology NAS maybe the expertise of you guys here suits better?

Recently we switched offices and as a result we now use a different NAS model as we used before. But now we're having struggles with running a simple "composer require" command.

This is the situation: 1. I got our project folder on NAS mapped as a network drive on my windows computer, f.e. I: 2. I want to require the following package in our project via the Composer php dependency manager installed on my local windows machine: "composer require dereuromark/cakephp-queue" 3. As a result I get the error "./composer.json is not readable". (By the way I can just read the content of the composer.json file both in windows explorer as through cmd so I don't think it's a permission thingy for my user actually)

On our previous NAS we did the exact same setup and that worked flawlessly. When we copy all the content from our project folder on the NAS to a local folder on C: and then run the same composer command it's just working. So it's got something to do with the NAS.

Anyone got an idea what NAS settings we could look at to make this working again?

Thanks!

Laurent
  • 135
  • 1
  • 6

2 Answers2

1

I've found myself in the exact same situation for a really long time, but I finally found a solution today. It's probably not the easiest one, but it works (for me):

  1. Open 'File Station' on your NAS and browse to the 'composer.json' file
  2. Right click the file and select 'Properties'
  3. Go to the 'Permissions' tab, and click the create button
  4. For the user, select Everyone, and check all permissions
  5. Try to run the command again and it'll probably be working now

The downside of this solution is that you'll have to repeat this step every time you have a new composer.json file. Might you know a better / easier way to fix this please let me know!

Rick Tibbe
  • 11
  • 1
0

Try running:

composer clear-cache

When transitioning to the new NAS, some old cache files might be in the way. I've also seen permission issues resolved with:

composer self-update

Note though that it might not be your user who needs the permissions, but the web user. So do inspect your setup to see which user runs the process, that one needs the right permissions.

JayMcTee
  • 3,763
  • 12
  • 20
  • Those two composer commands didn't have any effect unfortunately. I'll have our network administrator check the last thing. Thanks – Laurent Aug 09 '17 at 12:36