Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 03-28-2015, 06:41 PM   #1
In Runtime
tj107us's Avatar
Join Date: Apr 2010
Location: USA
Posts: 332
Default access denied in Linux

Hey guys, when I write a C program and store it on my USB thumb drive and I use the Terminal to compile the code. When I try to run it using (./name of exe.) it tells me access denied, but if I copy and paste to the root dir or desktop It runs it no problem. Does anyone have any idea whats going on, why I can complie it but can't run it on any other drive!!

thanks for any help,

Intel Core I7 930 OCed to 3.5Ghz
ASUS P6X58D-E Motherboard
(3x4Gb) of Kingston 1333Mhz RAM
Corsair 950 Watt PSU
Corsair H70 Cooler
ATI (AMD) 5770 GPU
WD 1Tb black HDD
WD 500Gb black HDD
All in a Cooler Master HAF 932 Case
tj107us is offline   Reply With Quote
Old 03-30-2015, 05:12 AM   #2
Baseband Member
Join Date: Mar 2014
Location: canada
Posts: 56
Default Re: access denied in Linux

Try the following while the harddrive is connected:
  • Open a command prompt and sudo to root (sudo bash)
  • chmod 777 /media/"usbname"

This will set the permission of the root-Directory of the external harddrive - e.g. it does not touch any of the other files. If you want to set it for all files:

  • chmod -R 777 /media/"usbname"

Inmos is offline   Reply With Quote
Old 04-03-2015, 08:03 PM   #3
Beta Member
Join Date: Apr 2015
Location: UK
Posts: 4
Default Re: access denied in Linux

The second command you have specified will recursively set the entire contents of the harddrive, including all sub directories and contained files. That's what the -R does.
andrewpearce is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

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

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0