By victhorweb
hello digital ocean, then q did the tutorial swapfile I can no longer log in with my normal User, the permission denied and it was after these commands, such as undo them or allow me loge with a normal User is not root
sudo chown root: root / swapfile sudo chmod 0600 / swapfile
plz help me
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Did you have any snapshots of your server before running these commands? <br>The reason I’m asking is that you have some errors in your commands, allow me to explain: <br> <br>sudo chown root: root / swapfile <br> ^ ^ <br> <br> <br>Notice there’s a space between “:” and “root” and also another space between “/” and “swapfile”. What this means is that you assigned EVERYTHING under “/” (basically all your filesystem) to the root user with an inexistent group (" root"). <br> <br> <br>sudo chmod 0600 / swapfile <br> ^ <br> <br>Same as before, the space between “/” and “swapfile” is interpreted as a separator, meaning that you are applying the file permissions 0600 (Read-Write only to the group) to EVERYTHING under “/” and a file called “swapfile” that should be in the current directory, and since no group called " root" (with a space) exists, nothing else has permissions to do anything in your server rendering it unusable.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.