[Synckolab] File Access Denied on Linux

Rob Yates ryates100 at gmail.com
Wed Apr 25 23:46:53 PDT 2007


Nik,
That's very good info, thanks for the response.  I hadn't realize that
file.create() is looking for an octal so that's good to know.

I found myself not recursing the directories with chmod because I
didn't know what the directories were going to be (short of scouring
the JavaScript for all file.create references :).  So I took the lazy
developer approach and ran the app, fixed perms on the directory, let
the app get a bit further, chmod that directory and so on.

Thanks again.

-Rob

On 4/26/07, Nik777 <kolab at babel.homelinux.net> wrote:
> Hi Rob,
>
> Referring to your reported problem, I can tell you what the problem is,
> and point you to a patch if you need it in the future (or you can work
> with this to fix the problem on your own machine :o)
>
> The patch is in the 'bugs' area, under bug 16910:
> http://bugzilla.mozdev.org/show_bug.cgi?id=16910
>
> The problem is indeed in the file.create(1, 775) line.
>
> The error is that in java '775' is a decimal number, not an octal one,
> as expected by the file.create() method. To make this an octal number,
> it needs to have a leading '0'.
>
> Ie, You need to use '0775' instead of '775'.
>
> If you change all the occurences of '775' to '0775' in tools.js,
> repackage the XPI and install it on a linux machine, you will find it
> now creates the folders with the correct permissions.
>
> Cheers!
> Nik
> > I was able to work around this issue.  It seems that for whatever reason,
> > the file.create(1, 775); calls to set up the synckolab directories for the
> > first time for some reason are setting odd permissions on Linux.  The
> > temporary workaround was to chmod 755 all of the directories that synckolab
> > tries to create ./synckolab, ./synckolab/contact,
> > ./synckolab/contact/Contacts, etc.  My sync now works beautifully!!!
> >
> For future reference, the -R option on the chmod command recurses the
> directory structure.
>
> Eg: chmod -R 775 ./synckolab
>
> Cheers!
> Nik.
> _______________________________________________
> Synckolab mailing list
> Synckolab at mozdev.org
> http://mozdev.org/mailman/listinfo/synckolab
>


More information about the Synckolab mailing list