Review Samsung Galaxy Tab A6 7.0 Inch 2016 (SM-T285)

Does it still relevant gadget in 2020? Yes, at least for me. Some I do & don't like about this tablet:

Yes, I do like:
  • The compact size (It's only 7 inch instead of 8 inch of latest Samsung Tablet)
  • Modern bezel design
  • The battery! (4.000 mAh and it could stand for 2 days)
  • 2Mpx front camera quite good for video meeting
No, I don't like:
  • 1.5GB RAM & 8GB ROM (big issue)
  • Lollipop is the latest Android OS (No more official update from Samsung since then)
  • No FHD screen
And here is the complete video review (in Bahasa):

So I recommend this Samsung Galaxy Tab A6 7.0 Inch 2016 (SM-T285) for parents to support their children online class session instead of buying another (overprice) laptop/notebook comparing to this tablet. Have a good day!

Labels: , , , ,

  Post a Comment

Yet Another Concept of Custom Manageable FTP (Part II)

Hi! The article of the custom manageable FTP is now continue. To read previous part content, please click on this link ( It will explained step-by-step about setting up virtual users on FTP server. To make your mind clear, if you have 10 FTP servers, the setting must installed in each machine.

A most tricky part is the authentication & uploader sub-routines. Before I explain it technically, here is a pseudo-concept:

  1. Provide users DB on a opt. DB Server.
  2. Provide a single HTTP Server for user authentication.
  3. Once a user has been successfully authenticated as well in front-end system, get the IP of FTP Server where they allowed to make a link.
  4. Also create immediately the FTP user using htpasswd feature and create all of the FTP environments (including home directory and it's permissions).
  5. Try to adding information to the file uploaded from client or some kind like that to securing it. Eg: a complete date string attached to file name will avoid it replaced by the same file or try to replace an empty space in file name into "_" characters, etc, etc.
  6. If there's file uploaded from user, make a direct stream connection to FTP server or IP address got from point #3, using ftp_connect, ftp_login and ftp_put (with additional FTP_AUTORESUME parameter).
  7. After file transferred successfully, move it to final destination.
  8. Freeing all buffer before quitting to save memory.

So, on this experiment, I currently using 3 MySQL tables; the user table, the ftp server mapping table & logging table. Take a look at below user table (m_users):

The table contain 3 fields only. The branch field indicate the unit code referring where the user come from. Create a dummy record on it like below example picture:

While ftp server mapping table only contains 2 fields (m_ftp).

The branch_grp field, contains 2 digit left of the unit code. It's described where the dedicated FTP will take place. Insert 3 dummy records as shown on below picture, as we'll use a real machine:

The last table (m_log), purposed for transaction logging. Replacing a common /var/log/vsftpd.log file. The records will auto-inserted later by the system.

Next, let's create UI form. This form contains user ID, password and a file type object, also a submit button.

So, when submit button pressed, the system will executing authentication to database & creating FTP users in realtime mode. The creation of realtime FTP users will be made from SSH connections - automatically. So, normally we need and OpenSSL ( natively installed on the web server. If your server luckily have it, test it with phpinfo files. It will displayed like below picture:

Anyway, if you found difficult to installed it manually, you'll no find anything on phpinfo file.

Since the installation of (and all of the dependencies) will takes time and too much complicated, so I'll using third party libraries which give the same basic function (and it's much easier). It named as phpseclib. Download it & place it to lib folder under the web server (/var/www/html/lib).

First, try the demo files. If it failed to upload a file to one of FTP server, then take a look at Linux firewall and SELinux configuration by running setup in console.

Even it show disabled, you still need to read /etc/selinux/config file exactly. In my experiments - weirdly - it's shows that the SELinux still in enforcing mode:

So, you must edit it to "disable":

Save it, reboot and make sure that the phpseclib demo file running successfully. Only if you're sure that all above tested and worked 100%, then, here below what belong on core PHP file (the front-end system):

if (isset($_POST['SUBMIT']))
// DB initialization
define("DB_HOST", "");
define("DB_USER", "db_user");
define("DB_PASS", "db_pass");
define("DB_NAME", "db_ftp");
if ($_FILES['filenya']['size']!=0) $imageexist=true;
else $imageexist=false;

// HTTP authentication
$r=mysql_query("select * from m_users where usr='$usr' and passwd='$passwd'");
if (($num==1) && ($imageexist))
while ($row=mysql_fetch_array($r)) {
$branch=$row['branch']; }

$r=mysql_query("select * from m_ftp where branch_grp=left('$branch',2)");
while ($row=mysql_fetch_array($r)) {
$branch_grp='kan' . $row['branch_grp']; }

$imagefile_name=str_replace(' ','_',$imagefile_name);
$imagefile_name=date ('Y-m-d',mktime(date('H'),date('i'),date('s'),date('m'),date('d'),date('Y'))) . '_' . $imagefile_name;

// create virtual users to selected FTP
$ssh = new Net_SSH2($ftp_server);
if (!$ssh->login('root', 'ftp_svr_password')) exit('Login Failed');
$ssh->exec('htpasswd -b /etc/vsftpd/vsftpd.passwd ' . $ftp_user_name . ' ' . $ftp_user_pass);
$ssh->exec('mkdir /var/www/users/' . $ftp_user_name);
$ssh->exec('chown vsftpd:ftp_users /var/www/users/' . $ftp_user_name);

// connect, login, and transfer the file
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$upload = ftp_put($conn_id, $destination_file, $imagefile, FTP_BINARY, FTP_AUTORESUME);

// check it if succeed
if (ftp_size($conn_id,$destination_file)!=0) {
mysql_query("insert into m_log values('$ftp_user_name','$destination_file',now())");
$ssh->exec('mv /var/www/users/' . $ftp_user_name . '/' . $destination_file . ' /var/www/users/' . $branch_grp);
echo("<script>alert('File $destination_file OK!')</script>"); }
else echo("<script>alert('Failed to upload $imagefile_name')</script>");

// freeing buffer
$ssh->exec('htpasswd -D /etc/vsftpd/vsftpd.passwd ' . $ftp_user_name);
$ssh->exec('rmdir /var/www/users/' . $ftp_user_name);
else echo("<script>alert('Authentication failed or no file uploaded!')</script>");

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>FTP Concept</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<form action="index.php" method="post" enctype="multipart/form-data" name="form1">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#000000"> <td colspan="3">
<font color="#FFFFFF">&#8226; <strong><font size="2" face="Geneva, Arial, Helvetica, sans-serif">
Manageable FTP with PHP (&copy; 2012 by Eko Wahyudiharto)</font></strong></font></td> </tr>
<tr> <td width="11%"><font size="2" face="Geneva, Arial, Helvetica, sans-serif">User Name</font></td>
<td width="2%"><font size="2" face="Geneva, Arial, Helvetica, sans-serif">:</font></td>
<td width="87%"><input name="usr" type="text" id="usr"></td> </tr>
<tr> <td><font size="2" face="Geneva, Arial, Helvetica, sans-serif">Password</font></td>
<td><font size="2" face="Geneva, Arial, Helvetica, sans-serif">:</font></td>
<td><input name="passwd" type="password" id="passwd"></td> </tr>
<tr> <td><font size="2" face="Geneva, Arial, Helvetica, sans-serif">File to Upload</font></td>
<td><font size="2" face="Geneva, Arial, Helvetica, sans-serif">:</font></td>
<td><input name="filenya" type="file" id="filenya"></td> </tr>
<tr> <td>&nbsp;</td> <td>&nbsp;</td>
<td><input type="submit" name="SUBMIT" value="Submit"></td> </tr> </table>

Save it and run it from browser. Try to upload a file and press submit button:

If there's nothing goes wrong, then my concept is worked perfectly. Take a look at picture below:

It explained that the realtime FTP user generator perfectly creating user P81000. But note that the files uploaded now has move to "kan03" folder (indicating that it could serve as it planned):

Last, take a look at m_log table, here's a record inserted when the file has successfully uploaded. Voila!:

This concept is tested, worked perfectly and it's ready to use. Even you may add some others functionality to enhance the security it self or others, including the hit performance handle or another environments such as the hardware availability. Have a mayday and please tell me your story on a box below. Thanks.

Labels: , , ,

  Post a Comment

Yet Another Concept of Custom Manageable FTP (Part I)

Dealing with tens of FTP users on a single FTP server is a damn quite easy job since we don't need to maintain hardly those users. It's as simple as creating some users for login on a PC & takes a bit way to create another, delete it or just read the physical log file. But then, how about if we have thousands of dynamic-moving-around users with more than one dedicated FTP servers around us? Well, at least, we're going to need some robots that work 24/7 in order to take care whole of the system. But, unfortunately we're not live in Terminator era that supplies any of it, still.

From below picture, there's a different user accessing different dedicated FTP server. We're talking about huge of FTP users here that will make the log files tracking seems impossible. Hence, also to avoid users storing garbage files to another FTP servers.

Basically, the concept is easy-cake - theoretically, but it's relevant to work on it. First rule is; No one of that FTP servers are browseable from clients & I don't need to create also managed those thousands FTP users manually but I have list contains of it stored in a table of MySQL database (thatís why I use a HTTP authentication server ñ in PHP of course). So, if your condition fit to the situation I described, this article may solve your problem.

The key is to create virtual FTP users! Yes, generate users at runtime on a flat text file with htpasswd cli ñ a feature of HTTPD service. Even the system can delete that virtual account after session ends. On this scene, I use RHEL server with built-in FTP daemon called as VSFTPD - as claimed as a Very Secure FTP Daemon (yet another secure, fast & stable FTP server). Unfortunately, a great number of Linux distros has lack of one important VSFTPD module named as pam_pwdfile (described for Pluggable Authentication Module purposed for authenticating users within htpasswd), including to this RHEL OS.

So, I suggest you to download this library to the HTTP authentication server. I got it from RPMBone site ( Continue to install it:

After it successfully installed, now we need to configure /etc/vsftpd.conf just like below:


Next, configuring PAM to check the passwd file for users. The file to configure is /etc/pam.d/vsftpd:

auth required pwdfile /etc/vsftpd/vsftpd.passwd
account required

Simply remove everything else from the file except both above line. After editing, save it. Just to make sure your above configuration files is marked with green OK sign, restart the service twice.

#service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                [  OK  ]
#service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                [  OK  ]

Next, create the passwd file containing a dummy user. I named it as "testis" & I grouped this user to "ftp_users" group. So, we need to create that group before creating the users:

#groupadd ftp_users
#htpasswd -c /etc/vsftpd/vsftpd.passwd testis

To add later additional users to the file, the command is change to:

#htpasswd -b /etc/vsftpd/vsftpd.passwd virgin boobs

The user ID is "virgin" and the password is "boobs". Next, continue to create a physical local user that's used by the virtual users to authenticate:

#useradd -d /home/vsftpd -g ftp_users -m -s /bin/false vsftpd

Also, create user's home directory since VSFTPD doesn't do it automatically.

#mkdir /var/www/users/testis
#chown vsftpd:ftp_users testis

Finally, restart the VSFTPD service. Make it tested from client using FTP client.

That's it. Now we have a basic skeleton template of dynamically manageable FTP servers.

Still confuse? It looks 100% make sense if you just stay tune on this blog for upcoming part II article in the next couple weeks, I'll plan to share the rest of it. Thank's for reading & have a great day!

Labels: , , ,

  Post a Comment

Foursquare and Me

Don't have idea why I'm so addicted with foursquare. It's so fun! Checked-in here, checked-in there and gaining some badges and points, that's all. Actually, nothing positive advantages from it except marked specific location and collecting badges. Even we need to spend charge to make internet connection. But somehow, this badges makes me curious. Here below my foursquare badges collection (I hope, the foursquare owner will provide goods from points replacement or badges - an iPad is a good start :)

This is everyone first badge. I was unlocking this badge when I checked-in at BLK Cijantung on June 11, 2011.
After checked into 10 different places, foursquare gave this badge to me. I was at Sierra Cafe & Lounge in Bandung on June 16, 2011 when I had this badge.
25 different places to checked-in and this badge is mine. I was at Arena Pekan Raya Jakarta on June 19, 2011 when unlocking it.
I was unlocking this badge after I checked-in at Gramedia Matraman on July 17, 2011. This badge dropped when you found 3 places with a photobooth.
The Superstar badge was unlocked when everyone has checked into 50 different venues. I had this July 24, 2011 at Dipo travel when I was in Padang.
Super User
To gain this badge, you need to check-ins 30 places in a month! This means a marked place per day. This badge revealed when I was at Ayam Penyet Pemuda Semarang in Pekanbaru on July 24, 2011.
4+ nights in a row and I had this badge. I unlocked it on July 26, 2011 at Sultan Mahmud Badaruddin II International Airport (PLM) in Palembang.
5 different airports check-in, and this badge is yours. I was at Sultan Mahmud Badaruddin II International Airport (PLM) in Palembang on July 26, 2011 after my flight from Pekanbaru airport.
I had this badge when I checked-in the same place for 3x in a week. I unlocking it on August 30, 2011 at my sister's house at Villa Besakih Puri Gading in Bekasi, Jawa Barat.
Weird badge name but I got it after I checked-in 4 places in one night. I was at Tol Cikampek - Ruas Jati Bening Cawang on August 31, 2011.
Need to check-in 5x near the water. Where is near the water in Jakarta?
Update: I got this badge when I was at Kuta, Bali island on Fri Oct 21, 2011.
There's no relation between this badge and your office. This badge actually proud to Steve Jobs, the founder of Apple inc. 3 Apple Store checkins, and this badge is yours.
Update: Finally, this badge revealed when I was at iBox Apple Store, Gandaria City on Sunday Oct 23, 2011.
Ziggy's Wagon
Lunch, dinner or just having snack out-there, don't forget to checked-ins on places signed with food truck pictures. 3 times marked for this badge.
Update: Finally, this badge unclocked when I was at RM Seafood 99 Condet on Nov 10, 2011
Checked-in on a place that has marked by other 50+ peoples at the same time is also not an easy jobs. I'd tried several places like Taman Buah Mekarsari, Airports & others super-malls (Cilandak Town Square & Pacific Place) both had failed. My last target is Ancol, just wish me luck to get it.
Update: Suddenly, I got this badge when I entered Soekarno Hatta International Airport on Nov 10, 2011. I found 61 peoples checked in at the same time :)
It's all need 10+ checkins in 12 hours. It's mean at least 1 check-in per hour.
Update: Well after shouting 10+ in a day, this badge finally mine! I was unlocking it when I check-in on Macet Semanggi arah Senayan at November 20, 2011. Kinda weird venues name right? I don't fuckin' care heh...
20 different pizza store to cover up this badge. I'm not a pizza connoisseur, but I'm ready to start :)
Update: After last of 5th check-ins at Pizza Hut Kampung Melayu on November 24, 2011, I'd covered up this badge.
Great Outdoors
Checkin 7 times to locations categorized as "Parks and Outdoors" or a subcategory. 7 times for me means 7 years to achieve this badge :)
Update: After check-in at several parks, finally I got this badge. I unlocked it at Manggala Wanabakti Pond and Park (Jakarta) at December 3, 2011.
10 different galleries check-ins to have this badge.
Update: Got this badge when I visit Pusat Kerajinan Gerabah Banyumulek, Lombok on December 24, 2011
I'm on a boat!
To get this badge, you need to 3x marking on a boat sign places on foursquare.
Update: Finally revealed this badge after checking-in at Pelabuhan Bangsal, Lombok island on December 26, 2011
School Night
Checking-in on a school after 3 AM and before 6 AM. Get ready for being a burglar.
Update: I got this badge when I check-in Jayakarta Hotels And Resorts Lombok in Lombok at 4.20 AM on December 27, 2011.

That's my 20 badges after all. And I still looking for another below visible badges:

16 Candles
5x birthday shout-outs containing special words like "Happy Birthday" to reveal this badge.
I don't know where the hell in Indonesia have this place. Anyone know? Tell me :)
Gym Rat
Sounds hard for me to checked-in 10x in one month on gym places. But it challenge me!
Don't Stop Believin'
Checked-in on 3 karaoke places in a month to have this badge. Interesting!
Only 10 theaters check-in to get this badge. Easy (theoritically)...
Player Please!
It's quite hard to checking-in with 3 members of the opposite sex. I think this my last badge to get :(
10 checkins on playground circuit. Well, I'd like to try...
Super Mayor
Having 10 mayorships at once is not easy for me. At least I'm not a member which often to checked-in the same place without any reason. But I still try to have this badge.
Animal House
Checked-in on 3 place that marked as college student basecamp. Even I had already graduated, well I can checked-in on some of the venues there... (someday)
Ski Bum
Ski area in Jakarta? Yeah, lots of it! But listen, it need to checked-in 7x in a week. It means 1x per day. Almost impossible for me :)

There are exactly total of 35 active badges available on foursquare. And here below the rest of 5 badges that's not visible for me to check-in :( (since it's so far far far far away)

Driving around San Fransisco... What? San Fransisco? Forget it!
Brooklyn 4 Life
25+ checkins in... New York? Impossible!
Far Far Away
Don't ever think that you have to checking-in thousands of km between but checked-in on 59th street in Manhattan is absolutely no way for me!
Gossip Girl
It's stated that this badge can only get at certain marked venues in New York or San Fransisco. What a badge!
Just the same badge with Gossip Girl :(

So, how about you, guys?

Labels: , , ,

  Post a Comment