FD: LS where not allowed?

Started by Joe, April 20, 2006, 08:31:38 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joe

joe@deadmeat:/var/www $ cd test/
bash: cd: test/: Permission denied
joe@deadmeat:/var/www $ ls test/
ls: test/testfile.dat: Permission denied
ls: test/testfile.dat~: Permission denied


Recreation:
1. gksudo [or sudo] gedit
2. Write testfile.dat (It can be empty, whatever).
3. Save testfile.dat to /var/www/test - making sure you create the folder inside gedit.
4. Open aterm, xtrem, gnome-terminal, or whatever, and type cd /var/www
5. Execute above commands.

Should this be allowed? If you can't even move into the folder, you shouldn't be allowed to list it's contents. In fact, the opposite behavior is displayed here, where I can navigate to iago's home folder, but not list the directory.

joe@deadmeat:~ $ ssh -p 8001 www.javaop.com
Last login: Tue Apr 18 17:02:03 2006 from aca2e2b1.ipt.aol.com
Linux 2.4.29.

NOTE: Please don't run SETI@home on Darkside, I don't have a lot of CPU to begin with.  If anything, run it on Pie.

Mr. Salter's side of the conversation was limited to expressions of assent.
When Lord Copper was right he said "Definitely, Lord Copper"; when he was
wrong, "Up to a point."
        "Let me see, what's the name of the place I mean?  Capital of Japan?
Yokohama isn't it?"
        "Up to a point, Lord Copper."
        "And Hong Kong definitely belongs to us, doesn't it?"
        "Definitely, Lord Copper."
                -- Evelyn Waugh, "Scoop"

joe@darkside:~$ cd /home/iago
joe@darkside:/home/iago$ ls
/bin/ls: .: Permission denied


Also, this seems to be only in effect for folders created by the superuser.

joe@darkside:/home$ ls iago
/bin/ls: iago: Permission denied


Discuss?
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Newby

Quotejames@impaler:~$ cd /home
james@impaler:/home$ ls
ftp/  hitmen/  james/  krazed/  newby/
james@impaler:/home$ ls newby/
/usr/bin/ls: newby/: Permission denied
james@impaler:/home$ ls -dl newby
drwx--x--x  2 newby users 4096 2005-09-21 19:30 newby/

james@impaler:/home$ cd newby
james@impaler:/home/newby$ ls
/usr/bin/ls: .: Permission denied
james@impaler:/home/newby$ cd ..
james@impaler:/home$ sudo chmod 755 newby/
Password:
james@impaler:/home$ ls newby
public_html@

james@impaler:/home$ cd newby
james@impaler:/home/newby$ ls
public_html@

Check the folder's permissions, 'tard.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Joe

Just like you to have both james and newby. =p
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Newby

The only reason I have newby is so when I give out a link on my home HTTP server, I can link them to ~newby instead of ~james.

And james I just wrote in place of my real user name (which includes my last name). Props to whoever can figure it out.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Quik

Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Newby

- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


MyndFyre

Incidentally (and I only bring this up since you asked "should" you be able to navigate a folder but not list its contents), I have an FTP server folder that allows writing of new files but not listing of contents (this is set through NTFS permissions).  Meaning, anonymous users (people who aren't impersonating, say, me) can upload, can't overwrite, and can't see what files are there.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Joe

Kinda like iago's upload script?
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Sidoh

Quote from: MyndFyrex86] link=topic=5644.msg66247#msg66247 date=1145733466]
Incidentally (and I only bring this up since you asked "should" you be able to navigate a folder but not list its contents), I have an FTP server folder that allows writing of new files but not listing of contents (this is set through NTFS permissions).  Meaning, anonymous users (people who aren't impersonating, say, me) can upload, can't overwrite, and can't see what files are there.

http://sidoh.dark-wire.net/upload/files

MyndFyre

Quote from: Joe on April 22, 2006, 05:42:21 PM
Kinda like iago's upload script?

Yes, but no programming required; it's a feature of the filesystem.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.