Solved changing permissions on multiple files

DKP

New Member
Not quite sure how I did this, but I was moving some files around and somehow I removed the "owner" information. As a result, when I try to do anything (i.e. open, copy) to the file it says I don't have permission to access the file location, even though I have administrator privileges. If I right-click on a file, and select properties, I can reset the owner to myself under the security tab. With that change, I can then go back to the security tab and delete the "users" and "authenticated users" user names (leaving only my user name and the administrators). At this point, I can access the file as expected.

Unfortunately, this takes several steps and I have dozens, if not hundreds, of files to do this to. If I highlight multiple files, I can still right-click and select properties, but the security tab no longer appears. Is there a way to change the owner of multiple files using a single command? Is there a way to delete users using a single command?

If I have to use the console that's fine, I just need a more effective way to make these changes.
 

My Computer

The takeown command sounds like what I was looking for, but when I run "takeown /f myfile" as directed in the tutorial I get "ERROR: Access is denied". My user has administrator privileges. Any ideas?
 

My Computer

Can you Highlight all the files then copy them over to your user account. Then deleted the problem account and create a new one.
I'm sorry that is all I can think of. Maybe someone else here can give you a better solution,
Gil777t
 

My Computer

System One

  • Manufacturer/Model
    Hp c3307c slimline
The takeown command sounds like what I was looking for, but when I run "takeown /f myfile" as directed in the tutorial I get "ERROR: Access is denied". My user has administrator privileges. Any ideas?

Good work so far Gil. Have you made sure you are running Elevated Command Prompt while doing this?
To enable this right click the Command Promt icon in the start menu and click run as an Administrator.

Oli
 

My Computer

System One

  • Manufacturer/Model
    Apple MacBook, 5,1
    CPU
    Intel Core 2 Duo 2.4Ghz
    Memory
    4GB DDR3
    Graphics Card(s)
    Nvidia 9400m
    Monitor(s) Displays
    13.3" Apple MacBook LCD Screen + 22" HannsG DVI LCD + 21.5" Samsung USB Lapfit Monitor LD220
    Screen Resolution
    1280x800 + 1920x1080 + 1920x1080
    Hard Drives
    SATA Internal 2.5" 500GB (305GB HFS+, 195GB NTFS)
    External USB 3.5" 1TB (HFS+)
    Case
    Aluminium Unibody
    Keyboard
    Apple Late 2009 Wireless Keyboard (US)
    Mouse
    Apple Magic Mouse
    Internet Speed
    6.33Mb/s up. 0.36Mb/s down.
    Other Info
    Harman Kardon Soundsticks II Speakers

My Computer

System One

  • Manufacturer/Model
    Hp pavillion a6110n
    CPU
    amd athlon 64 x2 live! 4400+
    Memory
    4 gigs 3.3 useable
    Graphics Card(s)
    Finally! SAPPHIRE 100283L Radeon HD 5770 (Juniper XT) 1GB 12
    Monitor(s) Displays
    generic pnp monitor
    Screen Resolution
    1280x1024
    Hard Drives
    7.2k rpm
    1 linux ubuntu partition
    1 vista partition
    1recovery partition
    1 windows 7 partition
    1linux swap partition
    PSU
    500W, antc earthwatts EA500
    Case
    normal black case
    Cooling
    fans
    Keyboard
    saitek cyborg gaming keyboard
    Mouse
    logitech mouse (small to fit hand perfectly)
    Internet Speed
    dsl
    Other Info
    2.3 ghz amd
Hi,

The simple way to do this is to take ownership of the containing folder, then apply the permissions you want to that folder. When you do this on a folder, by default, all contained files will be changed too. You can do this through Windows Explorer.

The Command Line options on the first tutorial referenced are out of date. They should now read:

(for whole folder)

takeown /f C:\Users\Richard\*
icacls C:\Users\Richard\* /grant:r %username%:f

(for individual file)

takeown /f C:\Users\Richard\text.txt
icacls C:\Users\Richard\text.txt /grant:r %username%:f

You can substitute %username% with Everyone etc. Do not put quotes around Everyone.

Richard
 

My Computer

System One

  • Manufacturer/Model
    Dell XPS 420
    CPU
    Intel Core 2 Quad Q9300 2.50GHz
    Motherboard
    Stock Dell 0TP406
    Memory
    4 gb (DDR2 800) 400MHz
    Graphics Card(s)
    ATI Radeon HD 3870 (512 MBytes)
    Sound Card
    Onboard
    Monitor(s) Displays
    1 x Dell 2007FP and 1 x (old) Sonic flat screen
    Screen Resolution
    1600 x 1200 and 1280 x 1204
    Hard Drives
    1 x 640Gb (SATA 300)
    Western Digital: WDC WD6400AAKS-75A7B0

    1 x 1Tb (SATA 600)
    Western Digital: Caviar Black, SATA 6GB/S, 64Mb cache, 8ms
    Western Digital: WDC WD1002FAEX-00Z3A0 ATA Device
    PSU
    Stock PSU - 375W
    Case
    Dell XPS 420
    Cooling
    Stock Fan
    Keyboard
    Dell Bluetooth
    Mouse
    Advent Optical ADE-WG01 (colour change light up)
    Internet Speed
    120 kb/s
    Other Info
    ASUS USB 3.0 5Gbps/SATA 6Gbps - PCI-Express Combo Controller Card (U3S6)

My Computer

System One

  • Manufacturer/Model
    Dell XPS 420
    CPU
    Intel Core 2 Quad Q9300 2.50GHz
    Motherboard
    Stock Dell 0TP406
    Memory
    4 gb (DDR2 800) 400MHz
    Graphics Card(s)
    ATI Radeon HD 3870 (512 MBytes)
    Sound Card
    Onboard
    Monitor(s) Displays
    1 x Dell 2007FP and 1 x (old) Sonic flat screen
    Screen Resolution
    1600 x 1200 and 1280 x 1204
    Hard Drives
    1 x 640Gb (SATA 300)
    Western Digital: WDC WD6400AAKS-75A7B0

    1 x 1Tb (SATA 600)
    Western Digital: Caviar Black, SATA 6GB/S, 64Mb cache, 8ms
    Western Digital: WDC WD1002FAEX-00Z3A0 ATA Device
    PSU
    Stock PSU - 375W
    Case
    Dell XPS 420
    Cooling
    Stock Fan
    Keyboard
    Dell Bluetooth
    Mouse
    Advent Optical ADE-WG01 (colour change light up)
    Internet Speed
    120 kb/s
    Other Info
    ASUS USB 3.0 5Gbps/SATA 6Gbps - PCI-Express Combo Controller Card (U3S6)
The takeown command sounds like what I was looking for, but when I run "takeown /f myfile" as directed in the tutorial I get "ERROR: Access is denied". My user has administrator privileges. Any ideas?

Good work so far Gil. Have you made sure you are running Elevated Command Prompt while doing this?
To enable this right click the Command Promt icon in the start menu and click run as an Administrator.

Oli

Using the command prompt w/ the run as administrator worked! Thank you so much.
 

My Computer

Hi DKP, I'm glad it worked for you. I just wanted to explain to you how to mark threads as solved and the uses of other buttons.

To the top right of this post you will see 3 icons. An orange (+), a set of scales and a red and white warning triangle.

The orange (+) or blue (-) denotes whether a user is on or offline (orange = on, blue = off)

The scales are used to give rep points; click this button if someone has helped you significantly or solved your queries (only give this to posts you think really deserve it).

The red and white warning triangle are used to denote either an abusive post OR to mark a thread ad solved (just put solved in the box that comes up and the admins or moderators will mark it solved).

I'll mark it solved for you this time.

Oli
 

My Computer

System One

  • Manufacturer/Model
    Apple MacBook, 5,1
    CPU
    Intel Core 2 Duo 2.4Ghz
    Memory
    4GB DDR3
    Graphics Card(s)
    Nvidia 9400m
    Monitor(s) Displays
    13.3" Apple MacBook LCD Screen + 22" HannsG DVI LCD + 21.5" Samsung USB Lapfit Monitor LD220
    Screen Resolution
    1280x800 + 1920x1080 + 1920x1080
    Hard Drives
    SATA Internal 2.5" 500GB (305GB HFS+, 195GB NTFS)
    External USB 3.5" 1TB (HFS+)
    Case
    Aluminium Unibody
    Keyboard
    Apple Late 2009 Wireless Keyboard (US)
    Mouse
    Apple Magic Mouse
    Internet Speed
    6.33Mb/s up. 0.36Mb/s down.
    Other Info
    Harman Kardon Soundsticks II Speakers
Hi Oli,
I will be using your solution in the future.
Gil

Feel free to (as long as you give me rep... uhhh I mean respect ;) ), I hope you've got a storage folder setup by now though Gil.

Oli
 

My Computer

System One

  • Manufacturer/Model
    Apple MacBook, 5,1
    CPU
    Intel Core 2 Duo 2.4Ghz
    Memory
    4GB DDR3
    Graphics Card(s)
    Nvidia 9400m
    Monitor(s) Displays
    13.3" Apple MacBook LCD Screen + 22" HannsG DVI LCD + 21.5" Samsung USB Lapfit Monitor LD220
    Screen Resolution
    1280x800 + 1920x1080 + 1920x1080
    Hard Drives
    SATA Internal 2.5" 500GB (305GB HFS+, 195GB NTFS)
    External USB 3.5" 1TB (HFS+)
    Case
    Aluminium Unibody
    Keyboard
    Apple Late 2009 Wireless Keyboard (US)
    Mouse
    Apple Magic Mouse
    Internet Speed
    6.33Mb/s up. 0.36Mb/s down.
    Other Info
    Harman Kardon Soundsticks II Speakers
Hi Oli,
I will be using your solution in the future.
Gil

Feel free to (as long as you give me rep... uhhh I mean respect ;) ), I hope you've got a storage folder setup by now though Gil.

Oli

You should not ask for +rep in this forum. It should only be given willingly.
 

My Computer

System One

  • Manufacturer/Model
    Dell XPS 420
    CPU
    Intel Core 2 Quad Q9300 2.50GHz
    Motherboard
    Stock Dell 0TP406
    Memory
    4 gb (DDR2 800) 400MHz
    Graphics Card(s)
    ATI Radeon HD 3870 (512 MBytes)
    Sound Card
    Onboard
    Monitor(s) Displays
    1 x Dell 2007FP and 1 x (old) Sonic flat screen
    Screen Resolution
    1600 x 1200 and 1280 x 1204
    Hard Drives
    1 x 640Gb (SATA 300)
    Western Digital: WDC WD6400AAKS-75A7B0

    1 x 1Tb (SATA 600)
    Western Digital: Caviar Black, SATA 6GB/S, 64Mb cache, 8ms
    Western Digital: WDC WD1002FAEX-00Z3A0 ATA Device
    PSU
    Stock PSU - 375W
    Case
    Dell XPS 420
    Cooling
    Stock Fan
    Keyboard
    Dell Bluetooth
    Mouse
    Advent Optical ADE-WG01 (colour change light up)
    Internet Speed
    120 kb/s
    Other Info
    ASUS USB 3.0 5Gbps/SATA 6Gbps - PCI-Express Combo Controller Card (U3S6)
Hi Oli,
I will be using your solution in the future.
Gil

Feel free to (as long as you give me rep... uhhh I mean respect ;) ), I hope you've got a storage folder setup by now though Gil.

Oli

You should not ask for +rep in this forum. It should only be given willingly.

I was not asking for plus rep there Richard (even tgough I admit in hind site it does look like that more than I intended). It was just a little joke between me and Gil. Sorry if it looked liked I was begging, I really didn't mean it that way.

Oli
 

My Computer

System One

  • Manufacturer/Model
    Apple MacBook, 5,1
    CPU
    Intel Core 2 Duo 2.4Ghz
    Memory
    4GB DDR3
    Graphics Card(s)
    Nvidia 9400m
    Monitor(s) Displays
    13.3" Apple MacBook LCD Screen + 22" HannsG DVI LCD + 21.5" Samsung USB Lapfit Monitor LD220
    Screen Resolution
    1280x800 + 1920x1080 + 1920x1080
    Hard Drives
    SATA Internal 2.5" 500GB (305GB HFS+, 195GB NTFS)
    External USB 3.5" 1TB (HFS+)
    Case
    Aluminium Unibody
    Keyboard
    Apple Late 2009 Wireless Keyboard (US)
    Mouse
    Apple Magic Mouse
    Internet Speed
    6.33Mb/s up. 0.36Mb/s down.
    Other Info
    Harman Kardon Soundsticks II Speakers
Back
Top