Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Bashing away at Unix



2008/3/12, Brian Chandler <brian@example.com>:
> (Um, this is not Linux, but FreeBSD, on my pair.com webserver.)
what is your FreeBSD version ( uname -a  ) and bash ( I assume that
you are using bash )?

>  ./myscript
What is cat myscript | head 1 and ls -l myscript ?


>  Even though the permissions are set to 700. But I see that . is not in
>  the current value of $PATH, but I also see that in a file .profile in my
>  home directory it sets PATH to _include_ .  - so where did . go to, or
>  how should I put it back?
>
what is your $PATH ( run: echo $PATH )
if you do chmod 700 myscript, then only the person who owns the file
myscript can execute the script. If you want to let other user ( cron
deamon, or other users )
be able to run that, do chmod +x myscript.

>  There's also something in .profile called umask, which I have just
>  changed to 077, believing that this will cause newly created files to
>  have only owner access. Logged out and in again, but touch still
>  generates a file with 644 permissions.
I don't think .profile and umask has anything to do with myscript.

.profile: your shell's startup file
umask: default permission when you "touch".

-- 
Best Regards,
Nguyen Hung Vu ( Nguyễn Vũ Hưng )
vuhung16plus{remove}@example.com
An inquisitive look at Harajuku
http://www.flickr.com/photos/vuhung/sets/72157600109218238/

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links