Wednesday, July 31, 2013

How to solve chmod doesn't work on mounted folder

When chmod does not have any effect on mounted folder, it could be wrong filesystem flag being used:
  • try umount the folder first
  • if you mount folder is a HDD, check its filesystem type by fdisk -l
  • if it is a NTFS, use the following in fstab :
    •  /dev/sda1    /mnt/folder    ntfs-3g    rwx,uid=xe4,iocharset=utf8,umask=000    0    0
  •  then mount -a
Then the chmod should work now.

Tuesday, July 30, 2013

Damn you, buggy Samba 3.6.3

I have been finding solution to address a samba sharing (Ubuntu 12.04.2 LTS) for few days, the errors that I faced:

  1. windows 7 cannot access share
  2. windows 7 keep asking password to access samba share
  3. windows 7 computer on other VLAN cannot browse the Ubuntu server with Windows Explorer
  4. troubleshoot using smbclient -L localhost -U% give errors such as:
    - tree connect failed, NT_STATUS_CONNECTION_INVALID
And very very luckily... I found a discussion & an article which discussed about the bug found in Samba 3.6.3, and suggest to upgrade to 3.6.7:

Thanks god their suggestion work.. and damn Ubuntu & Samba, how could they release such a buggy version for LTS and do not issue immediate upgrade in the official repository?!!

Alright, here's the solution copy from Marcel's blog:
  • sudo add-apt-repository ppa:nathan-renniewaldock/ppa
  • apt-get update
  • apt-get install samba
Voila! Now Samba works like a charm!

Saturday, July 27, 2013

[Ubuntu] The bad day!! How to recover from dmraid

Today is a real bad day, one of the Ubuntu server that I "managed" (it's not me who installed it) has gone down! There could be two reasons:
  1. Incompatible version of Zentyal (Zentyal 3.0 was accidentally installed on this 12.10, causing the samba not functioning)
  2. The electrical leak in the office due to DP box does not have proper earth line installed. Damn it, the whole rack is covered by electricity, and I got an electric shock! Luckily it was not at high current else all devices and I would have died =_=!
Well.. after hours of troubleshooting, I could not bring the server up and running again. It halted at different stage of loading, sometimes failed to load Samba, sometimes failed at Checking Quota...

I do suspect it is caused by the Zentyal... but time is running out. I rush back to home, taking my laptop SSD* installed with Ubuntu 12.10, together with as many as HDD I could found available for the backup**, and plugged into the server.

Voila! Now I'm inside my laptop Ubuntu, and by running dmraid -r, I could now see the RAID under name isw_xxxxx (isw is a prefix for Intel RST). By running dmraid -ay (activate with silent mode YES), I can now see the whole RAID in Nautilus.

I'm backing up those file now... hopefully the files and directories in the server are still in good condition. Losing a single files will be disaster. Cross finger!


* Why SSD? Because the Ubuntu server was installed using dmraid and Intel RST (Rapid Storage Technology), so SSD can work well as most of the time SSD is used under AHCI. SATA drive that previously installed without AHCI would fail to boot up.

** Please make sure you use a reliable HDD for the backup. You won't like to fail the second time where you could be only having once chance to perform the recovery.

*** Regarding the mdadm and dmraid, here are some good reads:


Monday, July 15, 2013

[Centos] yum-complete-transaction error

These commands are useful when yum-complete-transaction gives error, in my case "error removing yum" & "duplicate packages" (yum-utils need to be installed to perform no. 2 & 3):

  1. yum-complete-transaction --cleanup-only
  2. package-cleanup --dupes
  3. package-cleanup --problems