The folder /var/www was mounted during init, using:
mount -t vboxsf cuckoo_shared /var/www/ -o uid=1000,gid=1000,rw,dmode=755
Now, all the files belong to my user jdrummond as default.
I had two tabs open, both where I typed in "sudo -s". In one tab, I was in a different directory where I had to execute "chmod 755 *" In the other tab, I was messing with the brightness by doing "echo 1000 > /sys/class/backlight/intel_backlight/brightness". I accidentally executed "chmod 755 *" in two this tab.
hi,
sorry for posting this for a quick answer.
Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode?
Running chmod updates the last access/modified timestamp on the files, and i want to only run chmod on those that do not already have permissions 554 set
psudeo code:
for files where mode &l
The day before yesterday I ordered my own VPS.
I'm uploading to /var/www via SFTP and wondered how I can get it so when I upload a file or folder it always has the owner and group as www, and have the default chmod as 770.
I have tried this so far,
chmod 770 /var/www -R
chown www:www /var/www -R
and I have also tried
chmod u+s www -R
Currently when I upload a file the owner is the user I'm logged into and group www and chmod is 644.
I have a centos server that one of my apps creates files in a tmp folder. The files are always created with the permissions r--r--r-- and i need all the new files in this directory to be created with at the least, the permissions rw-rw-rw-.
How can i achieve this?
EDIT
Here's my current setup. I've chmod 777 everything in the /page folder.
I have a folder called "test" and this folder contains lots of other folders as sub folders, i intend to search for all file ending with .bin and then change the files to executable please how do i do this
---------- Post updated at 10:48 AM ---------- Previous update was at 10:42 AM ----------
got it
did
chmod +x `find -name *.bin`
To enforce the following permissions on files in /var/www, can I use the commands chmod u+s and chmod g+s? Do I just run it on the /var/www directory (once the permissions are properly set)?
Permissions:
chown -R root:web /var/www
chmod -R g+rw /var/www
pcuser wrote:only 10 seconds? nice..however I still would like someone to explain this if possible because I am still lost. on that link you gave me it said the user/group that apahce is on is not allowed to access those files/folders. How do I change that? the page also said something about chmod, but not I am not sure what to chmod the files to.