Compute

How to Change the PATH Variable in Amazon Linux

In Amazon Linux 2, as well as Linux in general, the PATH variable determines where the OS looks for executable files. This variable can be modified and allows for flexibility in organizing your directory structure. For example, let’s say that your OS is based off an image and all executable files that are installed with the image are located at the path, /bin. A user could then install executable files at the path of, /home/[username]/bin. And, the user could then modify the PATH variable, so that the executable files could run at the command line while only referencing the file name.

Moving EC2 User Files without Moving Permissions

“From the Mailbag” gives us at AWS w/ .NET the opportunity to answer questions from our users. Got a question for us? Ask us here.

Photo by Joanna Kosinska on Unsplash

Question

I have an EC2 instance and I need to move files from one directory to another and I need to make sure the files belong to a new user. I have tried the mv command, but the old user’s permissions stay intact. What am I missing?