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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
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.