Re: Something weird about file permissions

2009-03-31 Thread Countable Infinity
On Tue, Mar 31, 2009 at 7:56 PM,   wrote:
> Hi guys! Something is very weird or I didn't sleep enough last night. I am
> puzzled. How can an ordinary user delete a file he has no write access?
>
> See this example:
> p...@montblanc:~$ cd /tmp/
> p...@montblanc:/tmp$ mkdir test; cd test
> p...@montblanc:/tmp/test$ sudo touch file_owned_by_root
> p...@montblanc:/tmp/test$ ls -l file_owned_by_root
> -rw-r--r-- 1 root root 0 2009-03-31 16:17 file_owned_by_root
> p...@montblanc:/tmp/test$ id
> uid=1000(pep) gid=1000(pep)
> p...@montblanc:/tmp/test$ rm file_owned_by_root
> rm: remove write-protected regular empty file `file_owned_by_root'? yes
> p...@montblanc:/tmp/test$ ls -l file_owned_by_root
> ls: cannot access file_owned_by_root: No such file or directory
>
> I replicate consistently the same operations in several PCs. Doesn't
> matter if the file is empty or has any data. So, I am wrong to expect that
> rm returns an error when the user doesn't have write rights over that
> file?
>
> josep.
>

No write access on file means, you can not write into the file.

Deleting a file != writing into the file

So, the operation is allowed.

However, deleting a file = writing into the directory.

Because when  you delete a file, the directory is being modified,
which means writing into the directory (in UNIX and Linux, directory
and everything else is after all files).

So, if you remove the write permission from the directory, then you
would not be able to delete a file from it.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



How to remove automatically installed packages when nothing depends on them?

2009-01-23 Thread Countable Infinity
When I installed xfce4-terminal, it automatically installed
libxfce4mcs-manager3, libxfce4util4, etc. But now if I do:

aptitude purge xfce4-terminal

it does not remove these libs that were installed automatically.

Is there a way to remove these automatically installed packages  when
nothing depends on them any more?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



'who am i' command does not produce output in 'mrxvt'

2009-01-23 Thread Countable Infinity
'who am i' produces the following output in gnome-terminal:

hum...@nifty:~$ who am i
humptypts/22009-01-24 02:12 (:0.0)

However, in mrxvt, it does not produce any output.

hum...@nifty:~$ who am i
hum...@nifty:~$

What could be the reason for this? Is this a bug?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: 'who am i' command does not produce output in 'mrxvt'

2009-01-23 Thread Countable Infinity
Yes. I am executing the 'who am i' command (not 'whoami' command). So,
yes, I am putting space between them.

On Fri, Jan 23, 2009 at 8:51 PM, Frank McCormick
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Countable Infinity wrote:
>> 'who am i' produces the following output in gnome-terminal:
>>
>> hum...@nifty:~$ who am i
>> humptypts/22009-01-24 02:12 (:0.0)
>>
>> However, in mrxvt, it does not produce any output.
>>
>> hum...@nifty:~$ who am i
>> hum...@nifty:~$
>>
>> What could be the reason for this? Is this a bug?
>>
>>
>
>
>   whoami works in every terminal on my machine - are you putting in a
> space between who and ami ??
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkl6LcEACgkQnQV1aTcQlJucKQCffRb0RN+gDo6DEuODchHzXqSi
> BqYAn2z30fuvzxIxF1LHp2r6TT/nB7Kl
> =cjT1
> -END PGP SIGNATURE-
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: 'who am i' command does not produce output in 'mrxvt'

2009-01-23 Thread Countable Infinity
No,I am looking for the command 'who' with two arguments. The command
'whoami' prints only the user name. However, I want the tty and the
time stamp too. As per the man page of 'who':

"If  ARG1  ARG2  given, -m presumed: 'am i' or 'mom likes' are usual."

"-m only hostname and user associated with stdin"

So, 'who am i' is what I need. However, my question was a little
different. When 'who am i' is producing output in gnome-terminal, why
isn't it doing so in 'mrxvt' ?


On Fri, Jan 23, 2009 at 8:52 PM, subscriptions
 wrote:
> On Fri, 2009-01-23 at 21:44 +0100, Countable Infinity wrote:
>> 'who am i' produces the following output in gnome-terminal:
>>
>> hum...@nifty:~$ who am i
>> humptypts/22009-01-24 02:12 (:0.0)
>>
>> However, in mrxvt, it does not produce any output.
>>
>> hum...@nifty:~$ who am i
>> hum...@nifty:~$
>>
>> What could be the reason for this? Is this a bug?
>
> :) You did the command 'who' with parameters 'am' and 'i'.
>
> The command you are looking for is 'whoami'.
>
> Best,
>
> Rob
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: 'who am i' command does not produce output in 'mrxvt'

2009-01-23 Thread Countable Infinity
How can I check for utmp entry?

Also, if the UTMP entry doesn't exist why does it work in
gnome-terminal and while logging in through tty1, tty2, etc.?

On Fri, Jan 23, 2009 at 8:55 PM, Tzafrir Cohen  wrote:
> On Fri, Jan 23, 2009 at 08:44:42PM +, Countable Infinity wrote:
>> 'who am i' produces the following output in gnome-terminal:
>>
>> hum...@nifty:~$ who am i
>> humptypts/22009-01-24 02:12 (:0.0)
>>
>> However, in mrxvt, it does not produce any output.
>>
>> hum...@nifty:~$ who am i
>> hum...@nifty:~$
>>
>> What could be the reason for this? Is this a bug?
>
> No utmp entry?
>
> xterm is setuid root, and 'who mom likes' works there. mlterm is not and
> 'who -m' prints nothing.
>
> --
> Tzafrir Cohen | tzaf...@jabber.org | VIM is
> http://tzafrir.org.il || a Mutt's
> tzaf...@cohens.org.il ||  best
> ICQ# 16849754 || friend
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: How to remove automatically installed packages when nothing depends on them?

2009-01-23 Thread Countable Infinity
On Fri, Jan 23, 2009 at 9:02 PM, Alan Ianson  wrote:
> On Fri January 23 2009 12:42:30 pm Countable Infinity wrote:
>> When I installed xfce4-terminal, it automatically installed
>> libxfce4mcs-manager3, libxfce4util4, etc. But now if I do:
>>
>> aptitude purge xfce4-terminal
>>
>> it does not remove these libs that were installed automatically.
>>
>> Is there a way to remove these automatically installed packages  when
>> nothing depends on them any more?
>
> There is a setting in aptitude -> options -> preferences to remove unused
> packages automatically. Is it switched on?

Can't find any such thing. Could you please check your aptitude >
options > preferences and confirm which option it is?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Scrolling works in vim by default in gnome-terminal but not in mrxvt

2009-01-23 Thread Countable Infinity
Experiment 1
===
1. Open gnome-terminal
2. Run vim
3. Run command :help in vim
4. Use scroll wheel of the mouse to scroll
5. Scrolling happens successfully

Experiment 2
===
1. Open mrxvt
2. Run vim
3. Run command :help in vim
4. Use scroll wheel of the mouse to scroll
5. Scrolling does NOT happen successfully
6. Rn command :set mouse=a in vim
7. Scrolling happens successfully

Could you please tell me why this difference occurs?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Scrolling works in vim by default in gnome-terminal but not in mrxvt

2009-01-24 Thread Countable Infinity
In both the experiments, if I open vim and run :set vim, I get this in
the last line:

  mouse=  0,0-1 All


On Sat, Jan 24, 2009 at 8:45 AM, Tzafrir Cohen  wrote:
> On Sat, Jan 24, 2009 at 06:24:36AM +0000, Countable Infinity wrote:
>> Experiment 1
>> ===
>> 1. Open gnome-terminal
>> 2. Run vim
>> 3. Run command :help in vim
>> 4. Use scroll wheel of the mouse to scroll
>> 5. Scrolling happens successfully
>>
>> Experiment 2
>> ===
>> 1. Open mrxvt
>> 2. Run vim
>> 3. Run command :help in vim
>
> To save you typing:
>
>  vim +h
>
>> 4. Use scroll wheel of the mouse to scroll
>> 5. Scrolling does NOT happen successfully
>> 6. Rn command :set mouse=a in vim
>> 7. Scrolling happens successfully
>
> This is how it should be, I believe .
>
> What do you originally get for:
>
>  set mouse
>
> in vim?
>
> --
> Tzafrir Cohen | tzaf...@jabber.org | VIM is
> http://tzafrir.org.il || a Mutt's
> tzaf...@cohens.org.il ||  best
> ICQ# 16849754 || friend
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org