Normal user cp a file: Permission Denied

bond347

Member
Oct 21, 2022
68
1
13
Hi All,

Objective: Avoid using the root user for system configuration tasks, I’ve created an alternative user with elevated permissions. The goal is to perform all necessary system configurations and administrative tasks without relying on the root account.

Instead of using the root user, I created a new group group1 and assigned the "Administrator" role. Then, I created a new user, admin1, chose Realm PAM, and added the user to group1. These steps were performed via the GUI, and I also added admin1 using adduser via SSH.

Good news: I can successfully log in to both the Proxmox web GUI and SSH as admin1. However, I encounter a problem where I can't perform any operations, such as running a cp command, due to a Permission Denied error. I also tried using "sudo cp" with error "-bash: sudo: command not found".

Another example can't do "cp interface interface.ori", Permission Denied.

Could you help identify the issue and provide a resolution?
 
Last edited:
However, I encounter a problem where I can't perform any operations, such as running a cp command, due to a Permission Denied error. I also tried using "sudo cp" with error "-bash: sudo: command not found".
Well, you don't specify where you want to create/copy files to. But I assume some directory where your admin1 user simply does not have permissions.

Further, sudo is not installed by default and can be made available using apt install sudo. You will then need to configure sudo access for your user using visudo. I'd suggest reading either the documentation/manpages for sudo, but there are also a lot of guides for this out there.
 
Thanks, Cheiss for your reply. I will do sudo and reads up.

BTW, as mentioned, instead of using the root user, i planned to use admin1 user to perform system admin tasks. One of the tasks i tried as admin1 was "cp /etc/network/interfaces /etc/network/interfaces.bak" which comes with Permission Denied. As admin1 i wanted to perform this task and other tasks, like edit interface file.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!