Satellite හරහා නොමිලේ TV බලමු

TV බැලිල්ල අලුත් අත්දැකීමක් නොවුනත් තනියෙම Satellite එකකට Dish එකක් Align කරල ඒකෙන් TV බලන එක වෙනනම ආතල් එකක්..

iOS 14 අලුත් විශේෂාංග. Apple ලා Android වලින් මොනවද අරන් තියෙන්නෙ

Apple Special Event එකේදි (June 22, 2020) Appleල එයාලගෙ Operating System එකේ ලොකුම විශේෂාංග මොනවද...

ඉර හඳ තරු

කළුවර අහසට ආලෝකය දෙන්න තරු රැසක් මළානික ආලෝකයක් දෙද්දි ආවාට පිරුණු වටකුරු දෙයක් ඒ එළියට වඩා හැමෝම ආස...

සිව්වන වසර ආරම්භය

දැන් මගෙ අතින් බ්ලොග් ලියවෙන්නෙ නැති ද මන්දා.ඒත් ඉතින් සංවත්සරයක් නිසා ලියන්නත් එපැයි.. මාසෙකට පෝස්ට් එකක් දැම්මාට ඕක...

Root නොකර Android එකට සිංහල උගන්වමු

අද කියන්න යන්නේ Android ධාවනය වන ඒවට root නොකර සිංහල දාගන්න විදිය. මුලින්ම කියන්න ඕන මේ ක්‍රමය...

Pages

Showing posts with label SELinux. Show all posts
Showing posts with label SELinux. Show all posts

2015-06-19

Labeling files for writing with SELinux (fopen failed to write file)

Warning: fopen(newfile.txt): failed to open stream: Permission denied in /var/www/public_html/test.php on line 2
Unable to open file!

fopen gives above  error while opening stream for following code

<?php $myfile = fopen("newfile2.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); ?>

solution was labeling the file using following command.

chcon -t httpd_sys_rw_content_t filename


2010-10-06

Install Smarty on Fedora 13

1.Download Smarty from www.Smarty.net

2.extract it to same location where downloaded place

3. now make a directory named as "Smarty" in /usr/local/lib/php location
mkdir /usr/local/lib/php/Smarty

4. copy all the content of lib folder where extracted downloaded file to /usr/local/lib/php/Smarty
locate extracted folder (Smarty-xx) & then give
cp libs/* /usr/local/lib/php/Smarty

5.Set SElinux to permissive mode.
System->Administration->SELinux Management

* Remember to set template_c & cache writable for others

Quick install guide>>