permissions

Common admin commands?

Common admin commands? I usually work with administrator access privileges on my Ubuntu workstations. On a new machine, I’ve recently been offered only a normal user account; and asked to provide a list of admin-level commands which I would like to use. As such requests take a long time, I would like to get this …

Total answers: 1

I lose permission every day at midnight

I lose permission every day at midnight I require a file at the top of my PHP scripts. The file just has connection object for MySQL: $c->new mysqli(‘host’,’usr’,’pass’,’db’) The file has 400 permission: -r——– and I keep it in /etc/mysql/ away from my webpage root (/var/www/html). It works fine, except every night at midnight it …

Total answers: 2

Problem changing owner and permissions on new external drive

Problem changing owner and permissions on new external drive I just installed a new 2TB external drive (Ubuntu 20.04), created one partition, and formatted it to ext4. I mounted it to /mnt/ssk2TB. Now the drive shows in my Nautilus file explorer, but when I use copy-paste to copy a file to the new drive, I …

Total answers: 1

Regular user is able to modify a file owned by root

Regular user is able to modify a file owned by root If the file is a plain text file created by root with: echo ‘foo’ > ./file.txt Your ls -l is: -rw-r–r– root root ./file.txt But as a regular user, I can change this with vim saving with :w! or with a sed command and …

Total answers: 2

sshd: Authentication refused: bad ownership or modes for directory /data

sshd: Authentication refused: bad ownership or modes for directory /data I’m trying ssh-ing into a rooted Android phone, but it gives me an error Permission denied (publickey)., and the log says Authentication refused: bad ownership or modes for directory, despite of the fact I have configured the permissions and ownerships carefully and correctly as shown …

Total answers: 1

sticky bit on files and directories

sticky bit on files and directories I’ve always heard that sticky bit should be only used with directories, and I understand that, but what is the meaning if it is applied to a file. If I set the sticky bit to a file and do an ls -la I see a capital T, but I …

Total answers: 2

Firefox from mozillateam-ppa cannot write on non-root partition

Firefox from mozillateam-ppa cannot write on non-root partition I’m migrating from Gentoo to Ubuntu 22.04. Traditionally, I have all my firefox profiles on a seperate partition mounted at /profiles which is mounted via this line in /etc/fstab: PARTUUID="…" /profiles ext4 data=writeback,barrier=0,nobh,commit=120,nofail,noatime,nodiratime 0 0 Now, I figured firefox comes as a snap package, and I have …

Total answers: 1

Delete all files without user permissions

Delete all files without user permissions I have a prompt that asks me to delete all the files in a directory that the owner (u) can’t r, w, nor x, in one command. I tried this command: find data -type f ! -perm -u=rwx -exec rm -f {} ; … but I think it removes …

Total answers: 4

How to change permissions of /proc/pid/mem?

How to change permissions of /proc/pid/mem? As a personal project, I’m writing a small tool in Haskell to mimic the functionality of scanmem. It Scans /proc/pid/maps to obtain regions of virtual memory Scans through /proc/pid/mem to extract regions of memory with a given value It is still quite early in development, so I still rely …

Total answers: 1

Firefox can't read or write to directories symlinked across partitions

Firefox can't read or write to directories symlinked across partitions Using Ubuntu 22.04, I installed firefox from the mozillateam ppa (current installed version is 118.0.1). I have data stored on /dev/sda1, mounted as /data, and Ubuntu 22.04 installed on /dev/nvme0n1p2. The data on sda1 is accessed via symlinks. When I use Firefox to save to, …

Total answers: 1

All users getting "error creating /tmp//tmux-1003 (Permission denied)" when using tmux

All users getting "error creating /tmp//tmux-1003 (Permission denied)" when using tmux tmux used to work, but i forgot exactly what I did on the server to cause all users to not being to use tmux. I’m getting the errors for 2 different users: error creating /tmp//tmux-1003 (Permission denied) and error creating /tmp//tmux-1006 (Permission denied) What …

Total answers: 1

specify different –mode values using GNU tar

specify different –mode values using GNU tar I am trying to use GNU tar to create a tarball from a directory stored on a network drive. This network drive defaults the mode of everything stored on it to 0700 (-rwx——) and cannot be changed prior to the tarball creation. I had used this command to …

Total answers: 3

How to make the current working directory be highlighted in color?

How to make the current working directory be highlighted in color? my ns-3 is installed inside the source folder i.e., home/my_username/source/ns-3.39, when I try to ls inside the ns-3.39 directory, it gives: ls: cannot open directory ‘.’: Permission denied So I have to su root and then enter the ns-3.39 directory to use it. The …

Total answers: 1

home/user/Desktop and Public Folders Show as Type Link (broken) (inode/symlink)

home/user/Desktop and Public Folders Show as Type Link (broken) (inode/symlink) Ubuntu 22.04 LTS asked me for an update which I did and apparently everything went ok but upon restarting all my home folders appeared in my Desktop. Looking into my home folder I found out that home/user/Desktop and Public folders show as: Type Link (broken) …

Total answers: 2

How to make xrandr work without sudo?

How to make xrandr work without sudo? I toggle my resolution with: sudo xrandr –output eDP-1-1 –mode "3840×2400" How do I make xrandr not require sudo? So e.g. I can do: xrandr –output eDP-1-1 –mode "3840×2400" I am in the video group. I would not like to expose my password in a regular file, but …

Total answers: 1