Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 335
  • Last Modified:

take ownership of directory

Ive somehow lost ownership of a directory on an ext3 drive attached to my asus n56u.  I have terminal access to my router, but have very limited knowledge of linux.  there are a total of 4 folders on the drive.  I have write access to 2 out of 4 of the directories.  If i run a frisk -l, i get

Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1      243201  1953512001  83 Linux

how can i switch to the drive and get ownership of the troubled directories?
0
colonialiu20
Asked:
colonialiu20
1 Solution
 
omarfaridCommented:
You need to access the system as user root, then mount the filesystems, then as root you run

chown -R username:groupname /filesystem_mount

You need to put actual username , groupname and filesystem_mount
0
 
MazdajaiCommented:
>>how can i switch to the drive and get ownership of the troubled directories? See sample output:

# df -h
/dev/sda1             485M   34M  427M   8% /

Open in new window


To list the ownership:
# ls -lah /
total 114K
dr-xr-xr-x.  27 root root 4.0K Feb 22 20:17 .

Open in new window

0
 
SandyCommented:
this is just FS listing... Please provide directory names and the ownership details and use the same command which was provided by Mazdajai.

TY/SA
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now