Skip to content

Ubuntu is denying my permissions to my own server

0

So is there any particularly valid reason as to why my Ubuntu/Linux server is denying me permissions to combine two files together? This is despite using the sudo command, it's still denying me permissions.

I'm the one who created the server, I'm the sodding administrator for the bloody thing, why is this piece of crap denying me administrator privileges?

Absolutely ridiculous. I really do not have the time, nor the patience, for a server to start behaving like a disobedient spoilt little child.

asked 2 years ago311 views
2 Answers
1
Accepted Answer

Hello,

Please try this solution.

Step 1 Check File Permissions:

ls -l file1 file2

This command will show you the permissions of the files.

Step 2 Change Ownership and Permissions:

If the files are not owned by your user or don't have the right permissions, change them.

sudo chown yourusername:yourusername file1 file2
sudo chmod 644 file1 file2

Step 3Combine the Files Using sudo:

Use sudo correctly to ensure you have the necessary permissions.

sudo bash -c 'cat file1 file2 > combinedfile'

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
0

Two things come up to my mind. File Ownership and immutable attributes.

Even if you’re the administrator, if the files are owned by another user, you might not have the necessary permissions to manipulate them. You can check the ownership of the files using the ls -l command. However, the files might have an immutable attribute set. When a file has the immutable attribute, it can’t be modified, deleted, renamed, or linked to, even by the root user. You can check for this attribute using the lsattr command.

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.