Permission Denied Code Blocks Message | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Permission Denied Code Blocks Message

When I try to run a Code Blocks program I get a message in the terminal that says permission denied. How can I fix this? xxxxxxxx-iMac:~ xxxxxxxx$ /Users/xxxxx/Documents/First -bash: /Users/xxxxxx/Documents/First: Permission denied (X's are where the name would be) Thanks

23rd Dec 2016, 12:38 AM
Toby Flowers
4 Answers
+ 3
@Jakub Stasiak: You're right: I think of a web service like the code playground in here, not the IDE :( @Toby Flowers: So try to change the rights of your file, with the command Jakub indicates ;)
23rd Dec 2016, 1:07 AM
visph
visph - avatar
+ 2
Probably you can't have rights to access this file... That don't means that your reading rights are incorrects: what's the type of code you attempt to execute? I guess this is some html with javascript, isn't it? Because file access with javascript ( inside web page ) are restricted: you can only access the user file system if the source coude is stored inside it ^^ ( so, if you run it at Code Blocks, or Code Playground here, the source file is on a distant server :P )
23rd Dec 2016, 12:49 AM
visph
visph - avatar
+ 1
chmod 777 yourfile yourfile - full path to your file.
23rd Dec 2016, 12:43 AM
Jakub Stasiak
Jakub Stasiak - avatar
0
@visph- Code::Blocks is C, C++ and Fortran IDE. So I guess he's not trying to execute any web related files.
23rd Dec 2016, 12:52 AM
Jakub Stasiak
Jakub Stasiak - avatar