LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   "chgrp ksh" is working on ubuntu (https://www.linuxquestions.org/questions/linux-software-2/chgrp-ksh-is-working-on-ubuntu-825732/)

int80 08-12-2010 03:20 AM

"chgrp ksh" is working on ubuntu
 
I just installed ksh and I'm trying to assign it to a particular group, but I can't seem to be able to do it.

If I do:
chgrp privd /usr/bin/ksh

It doesn't change anything.

http://img571.imageshack.us/img571/1297/captureejp.png

Does anyone have any ideas?

druuna 08-12-2010 04:40 AM

Hi,

You need to change the "real" program (/etc/alternatives/usr.bin.ksh in your case) and not the link pointing to it.

Hope this helps.

int80 08-12-2010 05:03 AM

I've tried:

chgrp privd /etc/alternatives/usr.bin.ksh
chgrp privd /etc/alternatives/ksh
chgrp privd /usr/bin/ksh

Nothing seems to work.

druuna 08-12-2010 05:18 AM

Hi,

Just tried it, and it should work.

Can you post the output of this: ls -l /etc/alternatives/usr.bin.ksh /etc/alternatives/ksh /usr/bin/ksh

You don't mention any error messages, are there any?

int80 08-12-2010 05:28 AM

There are no error messages, which is odd. It seems to do it.


http://img827.imageshack.us/img827/9803/capturegi.png

I can't post the text as it's in a VM without VM Tools.

Thanks

int80

druuna 08-12-2010 05:59 AM

Hi,

As I stated in post #2, you need to edit the real program, not the link.

A link can be recognized by the l (lower L, not 1) in the first column: lrwxrwxrwx. A "normal" entry would look like something this: -rwxr-xr-x

Looking at the output you posted, I do believe the real program is /bin/ksh93 (you now know how to check it, if it is also a link then follow the link until you find the real program).

Hope this helps.

sem007 08-12-2010 07:37 AM

+1 druuna

when you change "group" of link file it will change group of real file.

in your case real program is /bin/ksh93

Code:

ls -l /bin/ksh93


All times are GMT -5. The time now is 11:56 AM.