how to change folder permission in cms made simple - permissions

im working with cms made simple.my problem is my template folder permission.in this cms when a template uploaded,a folder (by the same name of that temlate,for example : 'TEMP1') creates and it's permission is set to 0755.when i want to change permission of the template folder i will get this error :
FileOp Failure on: /home/visamast/public_html/uploads/arty1: Operation not permitted
and also when i want to upload files via ftp or cpanel to this folder nothing will happen,i mean the upload process will be done,but no files has been uploaded!!!!!!!!
how can i fix this problem?!

It sound like you are having an ownership problem rather than a permission problem. If your server is set up to run PHP as a module, files and directories created by PHP will be owned by the generic Apache user. Generally that means that you will not be able to change permissions on the file/directory. Most likely you will need to have your hosting company do a recursive chown on the entire directory tree your site is in to make you the owner of all of the files and directories.

Related

Permissions error installing new theme in Concrete5

I've just installed Concrete 5 CMS by following the instructions on the website.
The folders application/files/, application/config/, packages/ and
updates/ will need to be writable by the web server process. This can
mean that the folders will need to be "world writable", depending on
your hosting environment. If your server supports running as
suexec/phpsuexec, the files should be owned by your user account, and
set as 755 on all of them. That means that your web server process can
do anything it likes to them, but nothing else can (although everyone
can view them, which is expected.) If this isn't possible, another
good option is to set the apache user (either "apache" or "nobody") as
having full rights to these file. If neither are possible, chmod 777
to files/ and all items within (e.g. chmod -R 777 file/*)
The packages folder has permission 777 and root/tmp folder has permission 755.
I've uploaded a new theme to /packages over FTP. When I try to install the new theme I see the following error:
An unexpected error occurred. fopen(/root/tmp/1419851019.zip) [function.fopen]: failed to open stream:
Permission denied
I have FTP access to the server and access to CPanel. How do I get this working without granting too many permissions which pose a security risk?
My install has the folders application/files, application/config, packages, and updates all set to 755 and it's working just fine.
You get that error because the system is trying to write to /root/tmp, which apparently is the environment configuration for a temp folder when your PHP request is handled.
Try adding the folder application/files/tmp in your file system (within your concrete5 installation). And then make sure that the user can write to that folder that is running PHP in your environment. As explained in the concrete5's own documentation (that you linked originally), it depends on your server which user this is.
Usually in shared hosting environments it's the same as the account you use to login there through SSH or FTP. In these cases, the 755 permissions should be enough if your own user owns the tmp folder you just created.

Issue with importing a database into phpMyAdmin

I am learning how to use SQL, I set up a localhost, in the course of that journey, I was confronted to the issue of importing sql files into phpMyAdmin, I did the right click on config.inc.php and clicked on the Notepad++ that I previously installed, I typed in there the following code: $cfg['UploadDir']='c:\Files';, of course I created on the hard drive C the Files directory. Now that I came back into phpMyAdmin, clicked on my database, clicked on import, this is what I got as message:
The directory you set for upload work cannot be reached.
Can anyone help me here with this issue?
Your webserver probably doesn't have permission to read 'c:\Files' thus it is not a valid directory. Technically you would say this is out of the web root.
I suggest you set the upload directory to a subdirectory of your web server's root directory (or in the PHPMyAdmin web directory). Then if for your own ease of use you want it to be located at 'c:\Files' you can create a shortcut from the web root upload directory whatever you name it, and place the shortcut in 'c:' and name it 'Files'.

Rails/Paperclip - Can't see uploaded images

I have a Rails 3 application which has an attachment model and uses Paperclip gem. Everything works fine on development environment but on production server we cannot access any of the images uploaded. The images are in the right folder where they are supposed to be but when I try to reach them on browser I simply get the 404 page.
The upload folder is located under public folder and called "uploads"
I can access this: "app_url/uploads/test.html" which I manually created to see if it works
But I cannot acces this: "app_url/uploads/test.jpg" which I upload within the application via Paperclip.
I can guess this has something to do with the server configuration but I'm not an expert and may need help about it.
Thanks
UPDATE
I've just realised that uploaded files belong to "nobody" and when I manually change the owner to "root" it seems to be working fine. So I need to find a way to tell Paperclip make the files belong to "root"
It's not a good idea to have a web application being able to write files as root. File permissions are derived from the process writing the files. In case you're using Passenger, there's the concept of user switching:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultUser
Upon startup of your app, Passenger tries to figure out which user owns those files, and tries to switch it's application process to that user. In case it fails, "nobody" is the default.
Check your application permissions on the file level. You should have one user account per application on your server. The application (the directory and contents above the public directory) should be owned by this user. Files under public should be readable by others, so the webserver can pick them up, too.
Are you using Capistrano for deployment?

How to access the "app" folder via browser (localhost) in cakePHP?

I am using Apache server. Usually when I want to start a new website project, I created a new folder inside my server directory and inside that folder I would have 'index.html or index.php'. When I direct my localhost URL to that folder, it would open it and automatically display index.php.
Now I am trying something new with this CakePHP framework. I finished setting it up, and when I direct my localhost URL to folder 'cakephp-cakephp' (folder containing all the cakePHP files), it then shows me this message:
Release Notes for CakePHP 2.0.0-dev.
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit APP/config/core.php
Your database configuration file is present.
I think the next step here is to start the development by saving all my files to "app" folder. But the message is not gone even when I deleted the default index.php files from inside the folder 'cakephp-cakephp'. It seems anyway, the index.php files do not actually generate the message.
Does anybody know what file generates that release notes message? I want to delete that file so that I wont get the message (which I believe is triggered by some default file like 'index.php') when I access folder 'cakephp-cakephp', and then it will show me the file directory inside that folder instead, and I can traverse file directory easily using my browser and access my app folder, in which I am planning to store my index.php file, and save all my development files..
You cannot delete the index.php files and you usually don't modify those files unless you need to do some special configuration. Adding the file app/views/pages/home.ctp gets rid of that message and becomes your default home page.
Also, as stated in the comments, you should really read the manual and try the tutorial.
http://book.cakephp.org

Can't read or write to directory CFFILE despite 777 permissions coldfusion

This is installed on a Unix system I don't have direct access to, but can get insight on by sitting with a network team.
The problem is this, I have 3 folders I need access to, read and write. The problem is, I only have access to 1 of them, and only read. This is via ColdFusion, I can get into them fine with the user they are assigned to (and the CF server runs on, which is the "www" user).
I CAN read and write to the temporary file directory, the place files are stored before they are moved to the destination directory (SERVER-INF/ etc etc etc), but that's not helpful. I have tried having the network people set the permissions for the other folders to the same thing, but with no results. The current settings of the folder I can access are rwxrws--- and the other folders are rwxrwxr-x, so I should have more permissions ( the "s" is not a mistake in the first folder).
We have tried setting the other folders to 777 and we did not even get read capability. Does the server need to be restarted on a Unix box after setting new permissions for ColdFusion to be able to get to them? I'm out of ideas right now, I'll take any new suggestions.
TL;DR
All using ColdFusion
temp directory - can read and write to
folder 1 - can read from (including subdirectories)
folder 2 - cannot read or write to (permission denied)
folder 3 - cannot read or write to (permission denied)
Goal: Get upload functionality working.
Edit: Server using apache
Just a random guess... Have you checked that paths you are trying to access are fully correct? They should be absolute for file operations, and www user must have X permissions on the all path directories -- to enter them.
The problem ended up being a restart was required after setting the new folder permissions. We didn't think this was an issue on a Unix box, however ColdFusion apparently did. This worked.