Author Topic: FD: LS where not allowed?  (Read 3825 times)

0 Members and 2 Guests are viewing this topic.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
FD: LS where not allowed?
« on: April 20, 2006, 08:31:38 pm »
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?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: FD: LS where not allowed?
« Reply #1 on: April 20, 2006, 09:55:06 pm »
Quote
james@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

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. 

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: FD: LS where not allowed?
« Reply #2 on: April 20, 2006, 11:02:52 pm »
Just like you to have both james and newby. =p
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: FD: LS where not allowed?
« Reply #3 on: April 20, 2006, 11:29:50 pm »
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

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. 

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: FD: LS where not allowed?
« Reply #4 on: April 21, 2006, 12:04:22 am »
~jklinckttzz or whatever.
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

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: FD: LS where not allowed?
« Reply #5 on: April 21, 2006, 08:58:25 am »
~jklinckttzz or whatever.

Close enough. :P
- 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

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. 

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: FD: LS where not allowed?
« Reply #6 on: April 21, 2006, 05:08:55 pm »
Klinket!
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: FD: LS where not allowed?
« Reply #7 on: April 22, 2006, 03:17:46 pm »
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.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: FD: LS where not allowed?
« Reply #8 on: April 22, 2006, 05:42:21 pm »
Kinda like iago's upload script?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: FD: LS where not allowed?
« Reply #9 on: April 22, 2006, 07:08:26 pm »
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

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: FD: LS where not allowed?
« Reply #10 on: April 24, 2006, 06:54:50 pm »
Kinda like iago's upload script?

Yes, but no programming required; it's a feature of the filesystem.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.