How to change a file’s owner and group in Linux

You can change the owner and group of a file or a directory with the chown command. Please, keep in mind you can do this only if you are the root user or the owner of the file.

Set the file’s owner:
chown username somefile
After giving this command, the new owner of a file called somefile will be the user username. The file’s group owner will not change. Instead of a user name, you can also give the user’s numeric ID here if you want.

You can also set the file’s group at the same time. If the user name is followed by a colon and a group name, the file’s group will be changed as well.
chown username:usergroup somefile
After giving this command, somefile‘s new owner would be user username and the group usergroup.

You can set the owner of a directory exactly the same way you set the owner of a file:
chown username somedir
Note that after giving this command, only the owner of the directory will change. The owner of the files inside of the directory won’t change.

In order to set the ownership of a directory and all the files in that directory, you’ll need the -R option:
chown -R username somedir
Here, R stands for recursive because this command will recursively change the ownership of directories and their contents. After issuing this example command, the user username will be the owner of the directory somedir, as well as every file in that directory.

Tell what happens:

chown -v username somefile
changed ownership of 'somefile' to username

Here, v stands for verbose. If you use the -v option, chown will list what it did (or didn’t do) to the file.

The verbose mode is especially useful if you change the ownership of several files at once. For example, this could happen when you do it recursively:

chown -Rv username somedir
changed ownership of 'somedir/' to username
changed ownership of 'somedir/boringfile' to username
changed ownership of 'somedir/somefile' to username

As you can see, chown nicely reports to you what it did to each file.

How to to Increase PHP Memory Limit

When you saw an error reads “Fatal Error: Allowed memory size of xxxxxx bytes exhausted” either in browser or server logs , that means PHP had exhausted the max memory limit. Mostly, this’s due to the insufficient memory allocated for the script. This article will teach how to increase the momory limit.

Check The Memory Limit

To see how much memory allocated for you php, you need create a file on your server (like view-php-info.php), and put following code in it:

< ?php phpinfo(); ?>

Visit it in your browser, you’ll see a table list all the config about current php environment. Search for “memory_limit”.

Also, you can also use this way to variety the memory limit change.
Continue reading…

Important URLS for Microsoft Online Services (Office 365)

Following are the important URLS for Microsoft Online Services. You can add them to your Favorites menu in Windows Internet Explorer to ensure that you have them when you need them.

Global URLs

The following global URLs provide access to the appropriate regional portals regardless of where you are located.

Administration Center https://admin.microsoftonline.com
My Company Portal https://home.microsoftonline.com
Customer Portal https://mocp.microsoftonline.com/site
Partner Administration Center * https://partner.microsoftonline.com
Continue reading…

A Hyperlink Loads a New Page Which Breaks Out of the Frame

In html the target=”_top” attribute/value pair is used to create a hyperlink that —when activated— loads a new page which breaks out of all framesets. The new page is thus loaded into the original full browser window.

Here’s an example of the source code used in this scenario:

<a href="http://funbird.co.uk/" target="_top">funbird.co.uk</a> 

(funbird.co.uk represents the website you wish to load outside of your frameset and into the full original browser window.)

Symptoms of Diabetes

Diabetes is a group of metabolic diseases in which a person has high blood sugar because insulin production is inadequate.

Symptoms:There are following most common symptoms of Diabetes.

  • At the top it is unquenchable thirst, it could be a sign of diabetes.
  • As the insulin is not working properly,your cells are not getting their energy, your body may react by trying to find more energy.You will become hungry.So it also increases your hunger.
  • You may feel fatigued due to dehydration from increased urination and your body’s inability to function properly.
  • Weight losing is also a big symptom as your body is not functioning properly i.e, cells are not producing,your body starts to break down muscle tissue and fat for energy. Continue reading…

Smoking Facts

demerits of smoking

Smoking is very dangerous for your health. There are only disadvantages of smoking.Smoking facts are not really pleasant.Smoking causes cancer. What is often overlooked however  is the numbers of cancer that are caused as a direct result of smoking tobacco.When the cigarette smoke is inhaled, thousands of chemicals get into your bloodstream and travel throughout your body. These chemicals cause damage to different parts of the body.High blood pressure from smoking can damage the kidneys.Tobacco contains nicotine. Nicotine is very harmful drug for your health. When you smoke a cigarette, you are not taking only nicotine inside your body but you take thousands of other chemicals also. Continue reading…

Configure MATE Desktop for Fedora 18

MATE Desktop is an initial release for Fedora 18. It brings back a classic, intuitive, and easy to use desktop that users have been long requesting. Install MATE by issuing the command:

  yum groupinstall "MATE Desktop"

Support for MATE in Fedora is provided in #fedora-mate or #mate on irc.freenode.net or through the Fedora bugzilla.