ownership

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

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

Which first level directories in Linux should be owned by user?

Which first level directories in Linux should be owned by user? Today, I have accidentally noticed that the following directories of the / are owned by user, rather than root: /home /lost+found /media /mnt /opt /snap /srv /swapfile /var I have no idea how that could happen. It seems only logical that some of them …

Total answers: 1

mke2fs ignore root_owner

mke2fs ignore root_owner As you know, if there is no root_owner option, mke2fs use the user and group ID of the user running mke2fs. Let’s test it on Ubuntu 22 x86_64 (mke2fs 1.46.5 (30-Dec-2021)): Generate image mke2fs -t ext2 -I 256 -E ‘lazy_itable_init=0,lazy_journal_init=0’ -O ‘^large_file’ -O ‘^huge_file’ -L ext2test ‘diskEmpty.img’ 102400k Mount image gnome-disk-image-mounter -w …

Total answers: 2

How to keep ownership to same user for dir

How to keep ownership to same user for dir I have two users,memsql and 4px. I have copied dir from 4px user, home dir to memsql user home dir. I want the permission for dir poc & singlestore1 to be memsql , memsql. Instead of memsql & 4px user in below logs. Logs: [memsql@rnd-2 ~]$ …

Total answers: 1

Typically, which file users (owners) come with a distro?

Typically, which file users (owners) come with a distro? Typically, after installing a distro we get a root user and a sudo user. I don’t know if these are typically the only users owning files (as a user/u or "owner"), are they? or are there typically more users owning files and if so, what are …

Total answers: 1

scp change ownership of folder and files while transferring files

scp: How to change ownership of folder and files while transferring files When I transfer folder with files from srv1 with the username srv1 to srv2 with the username srv2 then the transferred folder and its containing files on srv2 are keeping the ownership srv1 scp -r /var/www/vhosts/srv1.com/httpdocs/profile_image root@777.777.777.77:/var/www/vhosts/srv2.com/httpdocs Is there a way to change …

Total answers: 1

Does chown command allow to set group different from user group?

Does chown command allow to set group different from user group? It may be a stupid question, but I don’t understand a detail about the command chown. I haven’t found any explanation for this detail yet, maybe because it’s so obvious to everyone. When you change a file ownership, you can set a user parameter …

Total answers: 1

Update only permissions etc. with rsync

Update only permissions etc. with rsync I’d like to know if the following scenario will update permissions, ownership, timestamps etc. Say I transfer a folder from a destination to another using rsync -zr source/ dest/, and then use the command rsync -auzr source/ dest/ – will the latter command then update the permissions, ownership, and …

Total answers: 1

Copying a file into a directory where I am a member of the directory group

Copying a file into a directory where I am a member of the directory group I am attempting to copy a file into a directory where my user account is not the directory owner but belongs to a group that is the directory group owner. These are the steps I have taken: Create a group …

Total answers: 2

Cannot change the ownership mounting ntfs drive

Cannot change the ownership mounting ntfs drive Why I cannot change the ownership on mounting ntfs drive? I give uid=1000,gid=1000, etc in my /etc/fstab file, but found it is not working. So I’m testing it out on command line: root@host:~# mount | grep /mnt/tmp1 | wc 0 0 0 root@host:~# mount -o uid=1000 /dev/nvme0n1p4 /mnt/tmp1/ …

Total answers: 2

Find specific folders and then change their ownership

Find specific folders and then change their ownership I’m running into security issues with multiple WordPress websites, and I need to recursively change the ownership (and permissions) for folder "wp-content" (and whatever is inside them). I need to find all the folders named wp-content (there are several) and change them and all their contents so …

Total answers: 3

Filesystem mounted as root but owned by user. Why?

Filesystem mounted as root but owned by user. Why? I’m mounting a filesystem as root and I don’t understand why it is not owned by root but by an unprivileged user. Here’s fstab: cat /etc/fstab […] /dev/sdb /mnt/projects ext4 defaults 0 2 And here’s what happens when mounting: ls -al /mnt/projects/ total 8 drwxr-xr-x 2 …

Total answers: 1

How to change owner of folder to current user recursively?

How to change owner of folder to current user recursively? Using sudo nautilus I created some folders and I want to get rid of root permission on them. But I have many and I want to do it to a entire directory and its containing folders. So how to allow read/write to current user to …

Total answers: 3

Undeletable directory in lost+found

Undeletable directory in lost+found How can I delete this directory? I did fsck and it has found some garbage, I looked through these files and there wasn’t something important. So I’ve tried to delete the contents of /lost+found and everything has gone except this strange directory. I thought that putting it to /tmp (I can …

Total answers: 2

How to mount the newly created linux partitions?

How to mount the newly created linux partitions? It seems repetitive even to myself asking this but I’ve searched this forum and have not been able to fix my issue. I had created one extended partition and installed my UBUNTU 14.04 on it. Now I have 440 GB available so have recently created two new …

Total answers: 3

Sudo doesn't work: "/etc/sudoers is owned by uid 1000, should be 0"

Sudo doesn't work: "/etc/sudoers is owned by uid 1000, should be 0" When I type a sudo command into the terminal it shows the following error: sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin How do I fix this? Asked …

Total answers: 6

Permission denied in FTP even though I'm the owner

Permission denied in FTP even though I'm the owner Okay, so I’ve tried my best at finding the answer to this by searching and looking through possible duplicates, but I just can’t so forgive me if it’s out there somewhere anyways. My issue is as follows. I’ve set the owner of /var/www to myuser:www-data and …

Total answers: 4