Re: Is my directory corrupted?

From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 06/09/05


Date: Wed, 08 Jun 2005 21:14:23 -0500

In the Usenet newsgroup alt.os.linux, in article
<11acjfq6qlhmaf0@corp.supernews.com>, craig wrote:

>I use the "#" to demote a command line command.
>I'm running as user most of the time and only root when I need to run
>apache or administrate....

OK - it can be a real problem running as root, because the system trusts
root - and if you screw up there, there are no safeties in place. Why
does Apache need root?

>[craig@SUNRISE-FC3 ~]$ ls -d */
>05a/ dns2go-2.0/ MP3's/

OK, you've got an alias going there - your 'ls' is actually running as
'ls -F'. Different problem - that "MP3's" is going to be a problem
because of the embedded apostrophe. It _is_ a legal character in a name,
but needs to be quoted... with a leading and trailing apostrophe (meaning
you'll have to type 'MP3\'s' to access it. You can use any ASCII character
in a file name EXCEPT a slash '/'. but I wouldn't do so unless you are a
masochist.

>I note the #ls -d /* which displays the system directories display at
>the normal almost instantly.... does this suggest something in my
>"craig" user directory is causing the trouble ?
>Are any of them Samba
>yes... one called.... ah I don't see listed in the above listing... I
>think you are on to something!

Where is the server?

>Samba has been a bugger to keep working... I've been having to turn the
>firewall off to get it to work. Then it works with the firewall turned
>back on.. and now maybe this is one of the cosequences of these
>manipulations...

The way to troubleshoot that is with 'tcpdump', to see what is trying
to go through the firewall. I can't help on Samba, as I don't have
any windoze boxes at home or work.

>> Does 'alias' return anything relating to ls?
>I'm not familiar with 'alias' come again on this please

[compton ~]$ alias
alias vi='vi -T linux'
alias which='type -path'
[compton ~]$

Literally, it's an internal Bash command. You can see all of these by
typing 'enable' - should list about 50 different commands. See the bash
man page for help on those, or try 'help alias' or what-ever.

[compton ~]$ enable | column
enable . enable continue enable fg enable popd enable test
enable : enable declare enable getopts enable pushd enable times
enable [ enable dirs enable hash enable pwd enable trap
enable alias enable echo enable help enable read enable type
enable bg enable enable enable history enable readonly enable typeset
enable bind enable eval enable jobs enable return enable ulimit
enable break enable exec enable kill enable set enable umask
enable builtin enable exit enable let enable shift enable unalias
enable cd enable export enable local enable source enable unset
enable command enable fc enable logout enable suspend enable wait
[compton ~]$

>> does the 'hostname' command return a full
>> hostname with dots and a domain?
>hostname? again I'm not sure what you want me to try

[compton ~]$ hostname
compton.phx.az.us
[compton ~]$

>Is that full hostname in /etc/hosts?

[compton ~]$ grep compton /etc/hosts
192.168.1.156 compton.phx.az.us compton
[compton ~]$

It had better be! Also, is your Samba server in there - again, these should
be full names with dots ('compton.phx.az.us', not just 'compton'). If you
are running a name server locally, it should return name to IP, and IP to
full name. Won't be the first time that's bitten people in the butt.
On your Samba server, it should also be able to resolve the names/IPs of
the clients.

>I think though your that the missing < mtpoint > which is the samba share
>directory is the issue.

Again, watch the special characters!!! By the way, did you know that
banging your head against a wall uses 180 calories an hour, while banging
it on the desk uses only 150??

         Old guy



Relevant Pages

  • Re: kernel panic
    ... echo Mounting /proc filesystem ... echo Mounting root filesystem ... Grub may have told the kernel to look in the wrong place for the root file system, the file system might be unreadable, or you may have moved the system onto a machine with a different type of disk controller that needs a different driver module included on the initrd. ... If your rescue boot mounts the system drives and suggests a chroot command, do that, then add the right alias command to /etc/modprobe.conf and then run mkinitrd. ...
    (Fedora)
  • Re: kernel panic
    ... echo Mounting /proc filesystem ... echo Mounting root filesystem ... Grub may have told the kernel to look in the wrong place for the root file system, the file system might be unreadable, or you may have moved the system onto a machine with a different type of disk controller that needs a different driver module included on the initrd. ... If your rescue boot mounts the system drives and suggests a chroot command, do that, then add the right alias command to /etc/modprobe.conf and then run mkinitrd. ...
    (Fedora)
  • Re: [opensuse] Permission problem while accessing a folder mounted with CIFS
    ... But according to ls everyone has a reading permission! ... It sucks that you have to allow mounting anything thru samba as root! ... The Samba server does not necessarily use the file ... system permissions on the server - it maps shares with a different set of ...
    (SuSE)
  • Re: OT: the rm bug hit me again
    ... And the -f in the rm command it to stop the "Confirm delete?" ... My rm is set to confirm all deletes using alias. ... the reason is to help prevent those type human errors when you are root ... I personally like the prompt because it reminds me that I am running as ...
    (Fedora)
  • Re: OT: the rm bug hit me again
    ... And the -f in the rm command it to stop the "Confirm delete?" ... That's not a good idea as it teaches you to expect to be prompted, and you'll be bitten badly some time when the alias isn't present. ... the reason is to help prevent those type human errors when you are root ... A user who expects rm to prompt will only delete their own files if it doesn't, a root user who expects rm to prompt can delete the entire system if it doesn't. ...
    (Fedora)