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

Can't get it to work. How do I enable write access? #24

Closed
jedthe3rd opened this issue Apr 19, 2018 · 4 comments
Closed

Can't get it to work. How do I enable write access? #24

jedthe3rd opened this issue Apr 19, 2018 · 4 comments
Labels
question Further information is requested waiting on feedback

Comments

@jedthe3rd
Copy link
Contributor

jedthe3rd commented Apr 19, 2018

This is what I get when I run it:
Screenshot from Gyazo

I am sure it is a problem with how I setup write access but I can't figure out how to fix it.

I am running a local drupal 8.4.5 installation.
Trying to setup a demo for a school project so any help would be appreciated.

@g0tmi1k
Copy link
Collaborator

g0tmi1k commented Apr 19, 2018

On the target, SSH in then do something like (btw, this is REALLY BAD IDEA IN PRODUCTION):

chown -R www-data:www-data /var/www/html/
chmod -R 0777 /var/www/html/

Not sure exactly how you set it all up.

For me:

$ ssh root@<REMOVED>
Last login: Wed Apr 18 11:39:52 2018 from <REMOVED>
root@ubuntu140045x64-drupal:~# cd /var/www/html/
root@ubuntu140045x64-drupal:/var/www/html#
root@ubuntu140045x64-drupal:/var/www/html# ls
drupal-7.55  drupal-7.55.tar.gz  drupal-7.57  drupal-7.57.tar.gz  drupal-8.4.5  drupal-8.4.5.tar.gz  index.html
root@ubuntu140045x64-drupal:/var/www/html#
root@ubuntu140045x64-drupal:/var/www/html# chown -R www-data:www-data /var/www/html/
root@ubuntu140045x64-drupal:/var/www/html#
root@ubuntu140045x64-drupal:/var/www/html# chmod -R 0777 /var/www/html/
root@ubuntu140045x64-drupal:/var/www/html#
root@ubuntu140045x64-drupal:/var/www/html# chown -R www-data:www-data /var/www/html/
root@ubuntu140045x64-drupal:/var/www/html# 
root@ubuntu140045x64-drupal:/var/www/html# ls -l
total 19520
drwxrwxrwx 9 www-data www-data     4096 Apr 18 15:08 drupal-7.55
-rwxrwxrwx 1 www-data www-data  3277355 Jun  7  2017 drupal-7.55.tar.gz
drwxrwxrwx 9 www-data www-data     4096 Apr 18 14:28 drupal-7.57
-rwxrwxrwx 1 www-data www-data  3279405 Feb 21 17:45 drupal-7.57.tar.gz
drwxrwxrwx 8 www-data www-data     4096 Apr 18 15:08 drupal-8.4.5
-rwxrwxrwx 1 www-data www-data 13414036 Feb 21 17:42 drupal-8.4.5.tar.gz
-rwxrwxrwx 1 www-data www-data        0 Apr 18 12:58 index.html
root@ubuntu140045x64-drupal:/var/www/html#

TL;DR

  • Log in
  • Move to the web root
  • Set web user (e.g. www-data) to own the web folders
  • Allow everyone & anyone to read/write/execute all the web root folders

@g0tmi1k g0tmi1k added the question Further information is requested label Apr 19, 2018
@dreadlocked
Copy link
Owner

You can now use drupalgeddon-not-write-shell.rb which do not require write permissions to work.

@jedthe3rd
Copy link
Contributor Author

jedthe3rd commented Apr 19, 2018

This is what I get when I run the drupalgeddon-not-write-shell.rb before changing my permissions on my drupal 8.4.5:
Screenshot from Gyazo

This is what I get on my drupal 8.5.0:
Screenshot from Gyazo

Something must be weird with my setup...
Also there was a typo on line 70 http.request(req) needs to be @http.request(req) .

@g0tmi1k
Copy link
Collaborator

g0tmi1k commented Apr 26, 2018

Please do not hijack other peoples issues.

Closing as @jedthe3rd hasn't replied.
Feel free to re-open this issue if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested waiting on feedback
Projects
None yet
Development

No branches or pull requests

3 participants