SCIENTIFIC-LINUX-USERS Archives

September 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Earl Ramirez <[log in to unmask]>
Reply To:
Earl Ramirez <[log in to unmask]>
Date:
Thu, 26 Sep 2013 16:43:31 -0400
Content-Type:
multipart/signed
Parts/Attachments:
text/plain (1914 bytes) , signature.asc (323 bytes)
On Thu, 2013-09-26 at 12:35 -0700, Mahmood Naderan wrote:
> So I have created a groups and add myself and another user to this
> group
> 
> [mahmood@tiger ~]$ groups
> mahmood sim
> 
> [anotherone@tiger ~]$ groups
> anotherone sim
> 
> 
> [mahmood@tiger ~]$ ls -l
> drwxrws---. 14 mahmood sim       4096 May 17 14:10 sim-3.0.31
> 
> 
Sorry, I just saw the mistake, I forgot to mention that you need to
grant access to the your home directory as mentioned by Mark.

chmod o+rx /home/mahmood (I added read as the user didn't have
permission to access the directory.

You should now be able to execute the script as another user.

For your reference:

I created a folder named "shared" in user2 home directory

@lab19 ~]# ls -la /home/user2
total 40
drwx---r-x. 5 user2 user2  4096 Sep 26 15:57 .
drwxr-xr-x. 5 root  root   4096 Sep 26 15:53 ..
-rw-------. 1 user2 user2  1387 Sep 26 16:27 .bash_history
-rw-r-----. 1 user2 user2    18 Feb 21  2013 .bash_logout
-rw-r-----. 1 user2 user2   176 Feb 21  2013 .bash_profile
-rw-r-----. 1 user2 user2   124 Feb 21  2013 .bashrc
drwxr-x---. 2 user2 user2  4096 Nov 11  2010 .gnome2
drwxr-x---. 4 user2 user2  4096 Dec 20  2012 .mozilla
drwxrws---. 2 user2 public 4096 Sep 26 15:57 shared
-rw-------. 1 user2 user2   641 Sep 26 15:57 .viminfo

Created the script and was able to execute it from the user name user1

@lab19 ~]# ls -la /home/user2/shared/
total 12
drwxrws---. 2 user2 public 4096 Sep 26 15:57 .
drwx---r-x. 5 user2 user2  4096 Sep 26 15:57 ..
-rwxrwx---. 1 user2 public   18 Sep 26 15:57 script1

user1@lab19 ~]$ /home/user2/shared/script1 
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_lab11-lv_root
                      5.5G  2.8G  2.5G  54% /
tmpfs                 504M  232K  504M   1% /dev/shm
/dev/vda1             485M   92M  369M  20% /boot
/dev/md127            2.0G  100M  1.9G   5% /home/labs




-- 


Kind Regards
Earl Ramirez
GPG Key: http://trinipino.com/PublicKey.asc


ATOM RSS1 RSS2