Code Monkey home page Code Monkey logo

Comments (7)

austintino avatar austintino commented on August 28, 2024

@olemartinorg Any idea what might be causing this? Issue caused in the code of your last commit.

Thanks in advance!

from c3.

olemartinorg avatar olemartinorg commented on August 28, 2024

Huh.. I think this must be a problem with the file system mirror inside the Vagrant VM. I've had strange problems like this with the VirtualBox shared folder drivers before. Can you check a few things for me?

  1. Connect to the VM as the root user and try to touch a file in the same directory. Do you still get a permission denied error? Root should have access to everything, so that's a sure sign there's something going on with the shared folder.
  2. What are the permission settings on the folder on the host machine? What are you running on your host, is it win/mac/linux?
  3. On the VM, try 'stat someFileThatDontExist' and then create it on your host machine (not on the VM!). After that, run 'ls -l' in the folder to see what the permissions on that (now existing) file is. There's a bug in some older version of the VirtualBox drivers that ends up marking the file with a lot of question marks on the permissions fields, and you can't read it on the VM until after a reboot.

from c3.

olemartinorg avatar olemartinorg commented on August 28, 2024

Did you find a solution, @austintino?

from c3.

austintino avatar austintino commented on August 28, 2024

Hi @olemartinorg,

Apologies for the slight delay in replying. You can find the answers to your questions below.
As stated above, the c3tmp directory is created by running the functional tests but then fails to be be able to write files to it which is very peculiar. How the information below helps.

1. Connect to the VM as the root user and try to touch a file in the same directory.

vagrant@ubuntu: ssh root@locahost
root@ubuntu:~# whoami
root
root@ubuntu:~# touch /var/www/phpapps/api.testurl.test/tests/_output/c3tmp/testfile.txt
root@ubuntu:~# ls -l /var/www/phpapps/api.testurl.test/tests/_output/c3tmp/
total 0
-rw-r--r-- 1 vagrant vagrant 0 Aug 23 11:37 testfile.txt

No issues creating a file in this directory. I had tried this before and found the same results.

2.a What are the permission settings on the folder on the host machine?

MyName:api.testurl.test thisismyname$ ls -l /Users/thisismyname/Sites/api.testurl.test/tests/_output/
total 1512
-rw-r--r--  1 thisismyname  staff    1631 23 Aug 11:30 GroupTokenCest.validGroupToken.fail.html
drwxr-xr-x  9 thisismyname  staff     306 23 Aug 11:33 blah
drwxr-xr-x  3 thisismyname  staff     102 23 Aug 11:37 c3tmp
-rw-r--r--  1 thisismyname  staff  766071 23 Aug 11:31 coverage.serialized

2.b What are you running on your host, is it win/mac/linux?

The host machine is

iMac, Late 2009
macOS Sierra Version 10.12.6

The VM is

VirtualBox
Version 5.1.18 r114002

Vagrant 1.9.2
Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)

3. On the VM, try 'stat someFileThatDontExist' and then create it on your host machine (not on the VM!). After that, run 'ls -l' in the folder to see what the permissions on that (now existing) file is.

On the VM:

vagrant@ubuntu:~$ whoami
vagrant
vagrant@ubuntu:~$ stat /var/www/phpapps/api.testurl.test/tests/_output/c3tmp/doesntexist.txt
stat: cannot stat ‘/var/www/phpapps/api.testurl.test/tests/_output/c3tmp/doesntexist.txt’: No such file or directory

On the host:

MyName:~ thisismyname$ stat /Users/thisismyname/Sites/api.testurl.test/tests/_output/c3tmp/doesntexist.txt
stat: /Users/thisismyname/Sites/api.testurl.test/tests/_output/c3tmp/doesntexist.txt: stat: No such file or directory
MyName:~ thisismyname$ touch /Users/thisismyname/Sites/api.testurl.test/tests/_output/c3tmp/doesntexist.txt
MyName:~ thisismyname$ ls -l /Users/thisismyname/Sites/api.testurl.test/tests/_output/c3tmp/doesntexist.txt
-rw-r--r--  1 thisismyname  staff  0 23 Aug 11:55 /Users/thisismyname/Sites/api.testurl.test/tests/_output/c3tmp/doesntexist.txt

from c3.

austintino avatar austintino commented on August 28, 2024

Any update @olemartinorg ?

from c3.

olemartinorg avatar olemartinorg commented on August 28, 2024

Oh, sorry about this - I forgot all about it and went on vacation...

Anyway, thanks for all the debugging! I have some more questions, that didn't quite clear things up for me.

  1. Which user is running all of this on the vagrant VM? I'm assuming the vagrant user? Can you log in as that user and touch a file in the c3tmp folder, or do you get the same error? What if you try to touch that specific file?
  2. On the third question I posted earlier, the last "ls -l" on the vagrant VM, not the host (sorry I didn't make that clear). What do you see then?

from c3.

nicholascus avatar nicholascus commented on August 28, 2024

Hi @austintino ,
you can sudo as your webserver/php process user and try to create, edit and save file /var/www/phpapps/api.testurl.test/tests/_output/c3tmp/codecoverage.serialized
`
su www-data -s /bin/bash

vi /var/www/phpapps/api.testurl.test/tests/_output/c3tmp/codecoverage.serialized

i new text

[ESC]:qw

ls -al /var/www/phpapps/api.testurl.test/tests/_output/c3tmp/
`
then you will know where to continue with your issue investigation.

from c3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.