Access Denied


19 posts
by crayzeedude » Sat Mar 30, 2013 11:35 pm
So, I want to run Minecraft:Pi Edition. Its directory is /media/PIDRIVE/mcpi. When I go to run it (via the terminal), I always get an "Access Denied" error. What am I doing wrong?!
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by Jim JKla » Sat Mar 30, 2013 11:51 pm
You probably need to look at permissions look for stuff on the chmod and chown commands ;)

This is basic Linux stuff and not as complicated as it sounds.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2165
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by crayzeedude » Sun Mar 31, 2013 12:53 am
Jim JKla wrote:You probably need to look at permissions look for stuff on the chmod and chown commands ;)

This is basic Linux stuff and not as complicated as it sounds.


How exactly would I do that? Just type the appropriate command?
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by NiXijav » Sun Mar 31, 2013 1:47 am
Try adding "sudo" when you execute Minecraft. For example, if Minecraft's executable name is minecraft-pi:
Code: Select all
sudo ./minecraft-pi
User avatar
Posts: 36
Joined: Fri Feb 08, 2013 12:17 pm
Location: Santiago de Compostela
by Jim JKla » Sun Mar 31, 2013 9:10 am
Is it actually possible that there are people using a forum online that don't know how to use a search enging like Google? :shock:
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2165
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by crayzeedude » Sun Mar 31, 2013 7:31 pm
NiXijav wrote:Try adding "sudo" when you execute Minecraft. For example, if Minecraft's executable name is minecraft-pi:
Code: Select all
sudo ./minecraft-pi


Doesn't work. It says "command not found".
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by NiXijav » Sun Mar 31, 2013 7:57 pm
Then try the following:
Code: Select all
chmod +x ./minecraft-pi

This will make Minecraft executable. After this, run the command I told you before:
Code: Select all
sudo ./minecraft-pi
User avatar
Posts: 36
Joined: Fri Feb 08, 2013 12:17 pm
Location: Santiago de Compostela
by crayzeedude » Sun Mar 31, 2013 8:37 pm
Still didn't work...
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by Oysterville » Tue Apr 02, 2013 12:45 am
Are you in the /media/PIDRIVE/mcpi directory?
Google is a helluva drug.
Posts: 54
Joined: Tue Feb 19, 2013 3:33 am
by daviddave » Sat Apr 06, 2013 12:37 pm
look on your sd card is the switch set to lock if so take it off and it should work
Posts: 33
Joined: Sat Apr 06, 2013 9:47 am
by yottskry » Sat Apr 06, 2013 2:37 pm
For goodness sake, people. You can see the guy is running with a ./ at the beginning and yet it takes three comments for anyone to mention that he needs to be in the same directory for that to work.

Code: Select all
cd /media/PIDRIVE/mcpi
chmod +x minecraft-pi
./minecraft-pi


If any of that doesn't work then part of what you've told us is wrong. Incidentally, the first two lines only need to be done once. If they work then in the future you need only do the third line.
Posts: 73
Joined: Wed Mar 06, 2013 10:11 pm
by crayzeedude » Tue Apr 09, 2013 11:46 am
I am in the /media/PIDRIVE/mcpi directory, and whatever I do with chmod, it's as if the terminal is ignoring the commands.
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by DeeJay » Tue Apr 09, 2013 11:52 am
Could you post the result of doing -
Code: Select all
cd /media/PIDRIVE/mcpi
ls -al


(This won't make the program run, It's just to let us see what files Minecraft has installed for you.)
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
User avatar
Posts: 2033
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK
by crayzeedude » Tue Apr 09, 2013 12:20 pm
Well, I just packed up my Pi and am now on my way to school, but I'll keep that in mind.
UPDATE: I finally know the correct syntax to change the permissions to execute, but it's as if it instantly resets them!
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by rurwin » Tue Apr 09, 2013 12:51 pm
If the USB drive is FAT formatted, and it probably is, there are no permissions flags to change. Files on the device probably all get the same permissions, which are set when the device is mounted. I know nothing about that, but maybe someone does.
User avatar
Forum Moderator
Forum Moderator
Posts: 2903
Joined: Mon Jan 09, 2012 3:16 pm
by SirLagz » Tue Apr 09, 2013 5:22 pm
By default, USB Fat drives have the noexec flag set.
Can you run the command 'mount' and paste the output ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by crayzeedude » Tue Apr 09, 2013 9:41 pm
Yes. This is the output from typing 'mount'.

/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=216132k,nr_inodes=54033,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44880k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89740k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda1 on /media/PIDRIVE type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks)
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by crayzeedude » Thu Apr 11, 2013 12:30 am
So I got it to run on my SD card, but I still need help with the flash drive's permissions...
Posts: 19
Joined: Mon Mar 18, 2013 3:52 am
by SirLagz » Fri Apr 12, 2013 1:27 am
You're going to have to either :
1) Mount the USB drive with different options to get execute permissions
Code: Select all
mount -o remount,rw,exec,uid=1000,gid=1000,fmask=0077,dmask=0077 /dev/sda1

or
2) Run the script like so
Code: Select all
bash /path/to/script

or
3) Reformat USB drive to ext4 to get execute permissions
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia