This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

IOException: Failed to chmod file

Discuss installing Symfony 2 here

IOException: Failed to chmod file

by salvat » Wed Jun 05, 2013 12:10 pm

Hello @ all,

i have a strange error with Symfony 2.3:

Our setup is a PC with a mounted drive over the network - all data is mounted with mod 777.

With Symfony 2.2 there was no problem - now in Symfony 2.3 we get "IOException: Failed to chmod file /Symfony/app/cache/dev/appDevDebugProjectContainer.xml" on the very first page.

Code: Select all
IOException: Failed to chmod file /Symfony/app/cache/dev/appDevDebugProjectContainer.xml
in /Symfony/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php line 177
at Filesystem->chmod('/Symfony/app/cache/dev/appDevDebugProjectContainer.xml', '436') in /Symfony/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php line 469
at Filesystem->dumpFile('/Symfony/app/cache/dev/appDevDebugProjectContainer.xml', '<% CONFIG_XML_DATA_A_PAGE_LONG %>'


Can someone help me to get it running again - i'm a beginner and waited for the long-term release to make a project with it, so i have actually no clue where the problem can be.
salvat
Junior Member
 
Posts: 5
Joined: Wed Jun 05, 2013 12:03 pm

Re: IOException: Failed to chmod file

by tiagojsag » Wed Jun 05, 2013 12:30 pm

Hi,

Do your remote FS and the protocol you are using to mount it support chmod?

cheers
Tiago Garcia
@tiagojsag

Core Web Developer @ Shopware
http://www.shopware.de
User avatar
tiagojsag
Faithful Member
 
Posts: 885
Joined: Wed Aug 10, 2011 4:58 pm

Re: IOException: Failed to chmod file

by salvat » Wed Jun 05, 2013 12:37 pm

Hello,

i don't think the FS is set up to support chmod, because all files are in 777 mode so there is no need for us to change permissions or anything on the development system - but that was never an issue until now.

I tried to fix it with uncommenting the "umask(0000);" but that has no effect.
salvat
Junior Member
 
Posts: 5
Joined: Wed Jun 05, 2013 12:03 pm

Re: IOException: Failed to chmod file

by tiagojsag » Wed Jun 05, 2013 12:53 pm

Just because your FS is mounted with 777 doesn't mean you don't need to change permissions. Actually, if you have 777 permissions, that means you DO need to change them. But let's not get into that discussion right now ;)

Symfony2 is trying to chmod a file and it can't. The problem is not permissions, is your FS that does not support the chmod operation. I'd take a look in the symfony git repo to see if there's an issue report regarding that, and if not, submit a PR or a issue report. Until then, the easiest way is to address this is to develop locally instead of in a remote FS.

cheers
Tiago Garcia
@tiagojsag

Core Web Developer @ Shopware
http://www.shopware.de
User avatar
tiagojsag
Faithful Member
 
Posts: 885
Joined: Wed Aug 10, 2011 4:58 pm

Re: IOException: Failed to chmod file

by salvat » Wed Jun 05, 2013 1:29 pm

tiagojsag wrote:Just because your FS is mounted with 777 doesn't mean you don't need to change permissions. Actually, if you have 777 permissions, that means you DO need to change them. But let's not get into that discussion right now ;)

It worked best for almost all development in the last years.

tiagojsag wrote:Symfony2 is trying to chmod a file and it can't. The problem is not permissions, is your FS that does not support the chmod operation. I'd take a look in the symfony git repo to see if there's an issue report regarding that, and if not, submit a PR or a issue report. Until then, the easiest way is to address this is to develop locally instead of in a remote FS.


Thank you for your help, i will do that.
salvat
Junior Member
 
Posts: 5
Joined: Wed Jun 05, 2013 12:03 pm

Re: IOException: Failed to chmod file

by tiagojsag » Wed Jun 05, 2013 1:40 pm

It worked best for almost all development in the last years.


You mentioned it happened after upgrading/starting a new project in Sf2.3. New versions add new features, but sometimes also break BC. Possibly some change introduced in 2.3 requires that chmod which, in turn, is causing your error. Report it so that the devs can take a look and, hopefully, it can be fixed in a future update, making sf2 better for you and everybody else.

cheers
Tiago Garcia
@tiagojsag

Core Web Developer @ Shopware
http://www.shopware.de
User avatar
tiagojsag
Faithful Member
 
Posts: 885
Joined: Wed Aug 10, 2011 4:58 pm

Re: IOException: Failed to chmod file

by zootime » Thu Jun 13, 2013 5:37 pm

I know it is not the solution, maybe a (bad) workaround, but I solved mounting the drive with the www-data user and group, wait for a better one
zootime
Junior Member
 
Posts: 1
Joined: Thu Jun 13, 2013 5:22 pm

Re: IOException: Failed to chmod file

by Jaza » Sat Jul 06, 2013 12:57 am

Bug report for this issue can be found here:
https://github.com/symfony/symfony/issues/8205
Jaza
Junior Member
 
Posts: 1
Joined: Sat Jul 06, 2013 12:56 am