Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-10-2012, 04:27 PM   #1
Registered: Apr 2010
Posts: 82

Rep: Reputation: 1
file permissions

I did ls-la in a folder I got

-rw-rw-r--  1 tomcat ec2-user 110005853 May 10 20:07 my.war
why does it show ec2-user , I moved this file from ec2-user home directory.
Old 05-10-2012, 05:29 PM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
In your example, "tomcat" is the owner of the file, and "ec2-user" is the assigned group. It is common, but not required, to have group names that are the same as some user names
Old 05-10-2012, 09:23 PM   #3
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
If you used 'mv' or 'cp', the file is moved or copied while preserving the existing permissions (including the owner and group).

You can use the 'cp' command with the --no-preserve=ownership option to change the owner and group of the file to that of the user performing the copy operation.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change file permissions on a mounted file system koodoo Linux - Newbie 2 04-06-2010 11:22 PM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
how to hide a file using file permissions in linux without using dot davender84 Linux - General 4 03-26-2009 12:13 AM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration