WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to grant full access authorization. (for all folders and all files)!?  (Read 1971 times)

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
How to grant full access authorization. (for all folders and all files)!?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Hi xor
How to grant full access authorization. (for all folders and all files)!?
You don't.

If you need to edit a file that doesn't belong to you:
Code: [Select]
sudo editor filename
If you need to copy a file to a directory that doesn't belong to you:
Code: [Select]
sudo cp -a filename directory
If you need to make a subdirectory in a directory that doesn't belong to you:
Code: [Select]
sudo mkdir directory/subdirectory
If you need to perform several commands on files or directories that don't belong to you:
Code: [Select]
sudo su

# Perform your commands

exit

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
Code: [Select]
sudo chown -R username:username /*
does this work! ?

Hi xor
How to grant full access authorization. (for all folders and all files)!?
You don't.

If you need to edit a file that doesn't belong to you:
Code: [Select]
sudo editor filename
If you need to copy a file to a directory that doesn't belong to you:
Code: [Select]
sudo cp -a filename directory
If you need to make a subdirectory in a directory that doesn't belong to you:
Code: [Select]
sudo mkdir directory/subdirectory
If you need to perform several commands on files or directories that don't belong to you:
Code: [Select]
sudo su

# Perform your commands

exit

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Hi xor
Code: [Select]
sudo chown -R username:username /*
does this work! ?
On most files, yes.
On loop mounted extensions (/tmp/tcloop) and possibly a few others, no.
Blindly changing the ownership of all the files on the system may create other problems.
When sane people are bothered by a fly, they reach for a flyswatter, not a shotgun.