Re: fatal: [Errno 13] Permission denied when repo init android source 4.1

2,210 views
Skip to first unread message

Shawn Pearce

unread,
Nov 1, 2012, 8:47:04 PM11/1/12
to Mick, repo-discuss
On Thu, Nov 1, 2012 at 5:43 PM, Mick <mickeym...@gmail.com> wrote:
> I'm trying to download android source Jellybean 4.1.1_r4. I got the
> permission denied as the following:
>
> Get https://gerrit.googlesource.com/git-repo
...
> fatal: unable to start /media/Stuff/Softwares/Android/jellybean4.1-sources/.repo/repo/main.py
> fatal: [Errno 13] Permission denied

Looks like you mounted this volume with noexec set, or are on Windows
where the exec flag got lost?

Mick

unread,
Nov 2, 2012, 10:12:39 PM11/2/12
to repo-d...@googlegroups.com, Mick

Yes, you might be right.
I have no idea to get it work...

Any idea to solve this issue?

Thanks 
Mick

Magnus Bäck

unread,
Nov 5, 2012, 10:16:16 AM11/5/12
to repo-d...@googlegroups.com
On Friday, November 02, 2012 at 22:12 EDT,
Mick <mickeym...@gmail.com> wrote:

> On Friday, November 2, 2012 7:47:30 AM UTC+7, Shawn Pearce wrote:
>
> > > fatal: unable to start
> > /media/Stuff/Softwares/Android/jellybean4.1-sources/.repo/repo/main.py
> > > fatal: [Errno 13] Permission denied
> >
> > Looks like you mounted this volume with noexec set, or are on Windows
> > where the exec flag got lost?
>
> Yes, you might be right.
> I have no idea to get it work...

It looks like you have the source code stored on a USB flash drive
(or similar device)? What file system does it have? If it's FAT, look
into how the file permissions are exposed to Linux and if it's possible
to change. Or, the drive's mounted with the noexec option -- check the
output of "mount" and look for the line with /media/Stuff. I'd actually
start there.

--
Magnus Bäck
ba...@google.com

Mick

unread,
Nov 6, 2012, 11:23:35 PM11/6/12
to repo-d...@googlegroups.com

The external drive is NTFS file system.

The default permission, it is already have exec option.

/dev/sda5 on /media/Stuff type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

I have try this command but it does not work

 mount /dev/sda5 -o remount exec

Thanks,
Mick

Magnus Bäck

unread,
Nov 7, 2012, 9:01:14 AM11/7/12
to repo-d...@googlegroups.com
On Tuesday, November 06, 2012 at 23:23 EST,
Mick <mickeym...@gmail.com> wrote:

> The external drive is NTFS file system.

Building Android with everything stored in a FUSE file system might be
painful and you're probably on unchartered territory. Are you sure you
don't have a few tens of GBs on a plain old Linux partition?

> The default permission, it is already have exec option.
>
> /dev/sda5 on /media/Stuff type fuseblk
> (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

Okay, so 'noexec' doesn't seem to be the problem, unless this driver
explicitly requires 'exec' to be set. So what are the permissions of
the file Repo complains about? Can you chmod the files to correct them?

There seems to be a bunch of articles written about this. I suggest you
dig up a few and see if they help. This isn't really a Repo question
anymore.

> I have try this command but it does not work
>
> mount /dev/sda5 -o remount exec

That command attempts to mount /dev/sda5 in the 'exec' directory.
Having a comma instead of a space between remount and exec should
solve that problem.

--
Magnus Bäck
ba...@google.com
Reply all
Reply to author
Forward
0 new messages