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

Oh Snap: Root is invalid or does not exist: var/www/html/app/ #394

Open
alcarazolabs opened this issue Aug 4, 2021 · 1 comment
Open

Comments

@alcarazolabs
Copy link

alcarazolabs commented Aug 4, 2021

I can make a connection through the console and I can create files or directories inside of /var/www/html/

Captura de pantalla de 2021-08-03 21-56-35

However when I run phploy it throwed this message:

Oh Snap: Root is invalid or does not exist: var/www/html/googleros/

It can't create the directory doing phploy --force I also created the directory in the server but I'm unable to deploy mi project.

this is my phploy.ini

; This is a sample phploy.ini file. You can specify as many
; servers as you need and use normal or quickmode configuration.
;
; NOTE: If a value in the .ini file contains any non-alphanumeric 
; characters it needs to be enclosed in double-quotes (").


; The special '*' configuration is shared between all other configurations (think include)
;[*]
;    exclude[] = 'src/*'
;    include[] = "dist/app.css"
;
;[staging]
;    quickmode = ftp://example:[email protected]:21/path/to/installation

[production]
    branch = master
    passive = true
    scheme = sftp
    host = 192.168.0.13
    path = /var/www/html/googleros/
    port = 22
    user = freddy
    pass = 123456
;    directoryPerm = 0755
;    permissions = 0744
    exclude[] = 'phploy.ini'
;    purge-before[] = "dist/"
;    purge[] = "cache/"
;    pre-deploy[] = "mkdir /var/www/html/googleros/"
;    post-deploy[] = "wget -q -O - http://staging-example.com/post-deploy/test.php"
;    pre-deploy-remote[] = "whoami"
;    post-deploy-remote[] = "date"

Any to fix this problem or is a bug?

PD: I can upload files without problems using filezilla.

This is the result of after try --force:

devjunior@devjunior-pc:~/Documentos/proyects/googleros$ phploy --force
-------------------------------------------------
|                     PHPloy                    |
-------------------------------------------------
Creating deployment directory: '/var/www/html/googleros/'.
Deployment directory created. Ready to deploy.

Oh Snap: Root is invalid or does not exist: /var/www/html/googleros/

thanks.

@alcarazolabs
Copy link
Author

Fixed
The problem was in the path of the phploy.ini here I was using /var/www/html/googleros ok. But when I tried to run the deploy I couldn't go to googleros/ because in the configuration of the file sshd_config of the sftp server the rule ChrootDirecotry had this value /var/www/ it means that when an user make a connection by default will be positionate here inside of www/ but it can't go from /var/www/html/ then to fix this I updated my path of the deploy.ini to html/googleros and it worked!

Problem found
I deployed a directory called somedir/ with a file inside of it, but when I run phploy --rollback <comit-id> the tool did the rollback of the file but didn't deleted the folder somedir/ in the server.

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