Monthly Archives: November 2010

NFS client “Permission Denied” on Debian unstable

While I was trying to access to a master NFS server in lenny from a squeeze client, I was having “Permission denied” when I tried to write any file; as there are other NFS clients with the same configuration this didn’t seem to be a problem of NFS configuration but rather from new client version.

After some googling time, I found this bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492970

If you want to know if your version is having this problem, you can check doing a “cat /proc/mounts” and should see the NFS mount with a “sec=null” and that is giving you the problem.

A suggestion from bug report is to downgrade, but that could not be an option in a fresh installed squeeze so the other workaround is easy:

  1. Unmount all nfs (important as I only unmount a exported filesystem from a server and won’t work until you unmount all)
  2. On /etc/fstab (or when mounting if you are doing manual) add the option sec=sys to all the mounts for that server; for example in fstab:
    example.com:/shared /tmp/shared nfs rw,sec=sys 0 0

    or mounting:

    mount -t nfs  -o "rw,sec=sys" example.com:/shared /tmp/shared

  3. Mount all nfs from that server

If you check the /proc/mounts you should see the sec=sys instead null and be able to write to remote server

Share

Flex 4: Getting bitmap data on a spark clipped content

Recently I was working on a project where I need to get the bitmap data from a container which had a scroller. From Flex 3 I tried to simply get the content directly from container; but I noticed that I only got the exact image of the scroller (Viewport) instead the full content.

With some playing, I got to the same easy solution; to draw the entire content of the container is to simply disable the clipAndEnableScrolling property over the container I was going to fetch the bitmap data and after drawing, enable again; as internally it just adjust the view properties, you won’t notice the change.

Here is the snippet:

this.containerDraw.clipAndEnableScrolling = false;
bmSave.draw(this.containerDraw);
this.containerDraw.clipAndEnableScrolling = true;

Where bmSave it’s a BitmapData, you can see an example here:

http://code.danguer.com/flex/clip-container

Share