Permission denied. Debian distro.

Natan Cabral
Feb 19, 2021

--

Sudo permission

How to solve “sudo: /etc/sudoers.d is world writable”

$ pkexec chmod 0755 /etc/sudoers.d
$ pkexec chmod 555 /etc/sudoers
$ pkexec chmod 555 /etc/sudoers.d/README

Directory permission

mkdir: cannot create directory ‘foldername’: No such file or directory. “{X}” is number, example /sda{X} is /sda5, or /sda7.

Input/Output errors are more an indication of faulty discs than of unproperly mounted filesystems. I have seen that mostly with USB drives, but also with IDE, SATA and SCSI.

$ fsck -n -f
$ fsck /dev/sd{X} -a
$ sudo chmod -R a+rwx /path/to/folder
$ sudo mount -o rw, remount /
$ sudo mount -o remount, rw ‘/mnt/FOLDER’
$ sudo ntfsfix /dev/sda{X} (NTFS)
$ sudo e2fsck -f /dev/sda{X} (EXT4)

--

--

Natan Cabral
Natan Cabral

Written by Natan Cabral

Full Stack Developer | Dev Java, Node.js, TypeScript, React.js, Vue.js, Express.js, Next.js, Rest API, Laravel, Databases, MongoDB, Unix distro and Open Source

No responses yet