News for hackers. Stuff that matters.
Re:Show HN: File Permissions Ninja by AnkhMorporkian on Friday October 31, 2014 @11:50AM (#8539394)
I love it, but it would be nice if it didn't break the back button every time you click on a checkbox.
Re:Show HN: File Permissions Ninja by arnel on Friday October 31, 2014 @12:10PM (#8539518)
It's the permalink.

Every time you click on a checkbox the permalink is change according to the permission, so its easier to copy the permalink. Therefore when you click the back button you're going to the previous state.

Do you think its not a good behavior?

Re:Show HN: File Permissions Ninja by bvanslyke on Friday October 31, 2014 @12:59PM (#8539782)
When I click "back" I expect to return to a previous webpage. I don't expect to uncheck a checkbox.

edit: Actually it doesn't uncheck, it just changes the permalink as if I unchecked. Definitely not the expected behavior. (this is on FF31 Linux)

Re:Show HN: File Permissions Ninja by ajanuary on Friday October 31, 2014 @12:22PM (#8539583)
You can use replaceState to modify the url without adding a new history entries.
Re:Show HN: File Permissions Ninja by arnel on Friday October 31, 2014 @01:45PM (#8540052)
Thanks for the comments.

I fixed it - and now its work with replaceState.

It's won't update until you load it without cache: ctrl+shift+R

Re:Show HN: File Permissions Ninja by piqufoh on Friday October 31, 2014 @12:17PM (#8539561)
Looks good, have been wanting something like this for a while. Bookmarked!

Also, love the use of .ninja domain - definitely most appropriate usage I've seen to date!

Re:Show HN: File Permissions Ninja by arnel on Friday October 31, 2014 @01:12PM (#8539850)
I didn't bookmarked it ;)

I didn't because i wrote a small command line utility to open the site with the right parameters.

You can also use it (instructions for ubuntu):

Copy the folowing to file with the name per:

#!/bin/bash

NC='\e[0m' # No Color

green='\e[0;32m'

blue='\e[0;34m'

if [ "$#" == "0" ]; then

echo "Usage: $0 filename" exit 1 fi

if [ "$#" != "1" ]; then

red='\e[0;31m'

echo -e "${red}$# Is illegal number of parameters.${NC}" exit 1 fi

usage(){

echo -e '\tper'

echo -e '\tOpen http://file-permissions.ninja with permission of the file.'

exit 1

}

if [ "$1" == "help" ] || [ "$1" == "-help" ] || [ "$1" == "-h" ] ; then

usage

fi

mode="`LC_ALL=C LANG=C /bin/ls -ld "$1" | LC_ALL=C LANG=C awk '{ print $1 }'`" || exit $?

echo -e "${blue}Opening: ${green}http://file-permissions.ninja/#$mode${NC}"

xdg-open 'http://file-permissions.ninja/#'$mode &> /dev/null

exit 0

# EOF ----------------------------------

Move per to folder within the path.

Let's say:

sudo mv per /bin

Now grant it execute permission:

sudo chmod +x /bin/per

Now you can use it with:

per filename

it's supposed to open the site with the permissions of filename.

Re:Show HN: File Permissions Ninja by lazyant on Friday October 31, 2014 @12:12PM (#8539529)
Neat. I suggest adding an explanation of what the special bits do (tooltip type of help on clicking the link?), as this is what's not obvious for most people.
Re:Show HN: File Permissions Ninja by ajanuary on Friday October 31, 2014 @12:23PM (#8539588)
It needs to add numpad keys to it's whitelist. Currently I can't use the numpad in the input boxes.
Re:Show HN: File Permissions Ninja by claar on Friday October 31, 2014 @12:30PM (#8539630)
Yeah, same problem here. At first I thought he had skipped out on allowing you to type the mask, which is the killer feature of a utility like this.

Also, when typing into the binary input, it isn't updating immediately on key-up like the rest of the inputs -- I'm having to hit the arrow keys to get it to update.

Nice utility, though!

Re:Show HN: File Permissions Ninja by arnel on Friday October 31, 2014 @12:50PM (#8539737)
You two both right :(

I don't use numpad keys so i forgot to add them to the whitelist.

And yes - there is a small bug with the binary input. Thank you for bringing this to my attention.

I'll fix these two issues!

Re:Show HN: File Permissions Ninja by dkopi on Friday October 31, 2014 @06:17PM (#8541370)
This is pretty cool and well done, but I kind of wish there was no need for this to exist. It seems that as the world progresses to higher level language, bit manipulations and binary calculation are the realm of dinosaurs.
Re:Show HN: File Permissions Ninja by DevUps on Friday October 31, 2014 @01:40PM (#8540016)
This is great, thanks! I suggest putting a check all box at the top of each column. That's my 2 cents.
Re:Show HN: File Permissions Ninja by diaz on Friday October 31, 2014 @04:22PM (#8540912)
Great, I'll try to remember this to use it.

Now add an advanced mode for easy configuring setfacl :P

Re:Show HN: File Permissions Ninja by rikkus on Friday October 31, 2014 @11:33AM (#8539274)
Looks lovely.

Have you thought about the ugoa/rwx... etc. version of the flags, i.e. partial setting?

Re:Show HN: File Permissions Ninja by arnel on Friday October 31, 2014 @12:12PM (#8539531)
Yep :)

Working on it...

Re:Show HN: File Permissions Ninja by GigabyteCoin on Friday October 31, 2014 @01:43PM (#8540037)
I actually stumbled across this on Google just yesterday and found it quite useful.
Re:Show HN: File Permissions Ninja by Phogo on Friday October 31, 2014 @10:20AM (#8538849)
Easy to understand, really like the help walkthough style too. Nice job.
Re:Show HN: File Permissions Ninja by arnel on Friday October 31, 2014 @10:32AM (#8538931)
Thanks. The walkthrough is made with intro.js

Can be found here: https://github.com/usablica/intro.js

Re:Show HN: File Permissions Ninja by Erwin on Friday October 31, 2014 @06:04PM (#8541320)
Now please add a full interactive explanation of Posix ACLs.
Re:Show HN: File Permissions Ninja by phloxicon on Friday October 31, 2014 @12:29PM (#8539622)
Very handy. Thanks.
Re:Show HN: File Permissions Ninja by probinso on Saturday November 01, 2014 @05:21PM (#8544665)
doesn't work with number pad
Re:Show HN: File Permissions Ninja by arnel on Saturday November 01, 2014 @06:06PM (#8544803)
it was a small bug but i fixed it.

Now it should work with the number pad.

To make it work load it without cache: ctrl+shift+R

Thanks for the comment!