Server :: How To Www-data Chown A File

Jun 11, 2010

I have a php script that creats some files and moves them into certain directories. When the files are created, the ownership is www-data:www-dataWhen they are moved to the appropriate directories the maintain that. But, I need the files' ownership to be changed to asterisk:asteriskHowever, www-data doesn't have permissions to do this. I don't want to run a cron as root that does this (I'm already doing that). I really wish there was a way for my files to be created via my php script and in that same file do something like:
system("chown asterisk:asterisk /home/test/test.call");

View 7 Replies


ADVERTISEMENT

Server :: Sync File Server Data Into Backup Server Machine By Command- Rsync -avu?

Jun 21, 2011

iam trying to sync file server data into backup server machine by command- rsync -avu path/of/data ipaddress-of-backup-server:/path/where/to/save after running it ask for root password and manually it is successful.but i want to make it automatic.for that i also tried cronjob and also generated authentication key but iam not successful in login automatically..anybody know how to authenticate root to login for storing data in backup server.

View 14 Replies View Related

CentOS 5 :: Allow Php To Create File, Chown -R Apache Folder

Apr 6, 2010

I have a php script that I want to create a file and allow it to be downloaded. I know the dangers of chmodding a directory to 777 so I am trying to avoid this.

What I have done is logged in through ssl as root.

Navigated to the directory where the directory I want to chown is located. I then perform:

chown -R apache directory

View 2 Replies View Related

Server :: Kernel & Chown The Second Drive

Mar 21, 2010

i have problem to chown the seconde drive, i dont know how can mount it,

[Code]....

and the server has 16 gb ram and after i install openvz i can see only 3 gb ram, server working on centos 5. 32bit

View 6 Replies View Related

Server :: File Server Machine To Store All Data So Being That Have Got Four Identical SATA Hard Drives?

Jan 25, 2011

I've got 4 identical 1 TB drives and would like to use them in a software RAID configuration on my home server. I'm running Debian Linux using 'mdadm' utility to manage the software RAID. I don't know how much I've read is fact or dated or even false so I decided I would ask here to get help from people who know more about this than I do. This is essentially just a file server machine to store all my data so being that I've got four identical SATA hard drives, I was thinking about doing RAID level 5. I guess I'll start here and ask if that is the recommended level of RAID. I think RAID level 5 will be fine for my general server usage. My second issue is partitioning the four individual drives to get maximum performance / space from them. Basically just asking here how would you or you recommend I partition the drives? I was thinking about doing three seperate partitions per drive:

/dev/sda1 = 4 GB (swap)/dev/sda2 = 1 GB (/boot)/dev/sda3 = 995 GB (/)Now from that partition schema above, obviously all the types will be 'fd' for RAID and the partition for /boot is going to be bootable. My confusion is that I read Grub doesn't support booting from RAID 5 since Grub can't handle disk assembly. If /dev/sdx2 (sda2, sdb2, sdc2, sdd2) are partitioned for /boot (bootable), how would you guys configure this RAID to match up equally? I don't think I do a RAID level 1 on 4 identical partitions, right?

View 1 Replies View Related

Server :: Trying To Delete Data From File With Php

Oct 20, 2010

i've been using php/fwrite to add text to a file using the below code but how do i remove text from a file? note that i don't know what line it's on as there will be other content in the file.

View 5 Replies View Related

Server :: Accessing Database In FBD Data File

Feb 19, 2011

We purchased a new database system at work last October, ditching the old system because of a lack of support from the vendor. This is a retail Point of Sale and Backoffice database system. I am not sure what system the new one runs on, but the system we replaced was a Firebird data base. The reason I am posting is because we are now in need of the information contained in the old database which was not completely imported into the new system. Unfortunately, we parted company with the old vendor under extremely hostile conditions, and they are not a source of help for this problem, nor are the new vendors.

Basically the problem is this: The database in on a Windows XP system and I found a copy of SQL Manager Lite 2008 on the system, which after quite a bit of studying, I figured out how to extract the database into a removable file. I have this file (178MB) on a USB stick in a file called Backoffice.fbd. I can get into this database with MySQL. All I want to be able to do get into the database and create tab deliminated spreadsheet files for each of the database sections (Customers, Repairs, Sales History, stock files, etc.) Is it possible to do this with Ubuntu and MySQL and if so, can an expert suggest one or two things to get me started.

View 3 Replies View Related

Server :: Data Recovery - File System EXT3

Sep 30, 2009

I have lost the data of my drive having file system ext3, please tell me the most reliable softwares for data recovery, please try to tell also GUI software.

View 1 Replies View Related

Server :: Append A Set (or Sets) Of Data To A File(or Files) On Remote Hosts?

Dec 26, 2009

If I need to append a set (or sets) of data to a file(or files) on remote hosts what is the best mechanism by which to do that? My first thought was ssh but the command syntax to append to a remote file isn't clear to me. Can anyone point me in the right direction here?

View 4 Replies View Related

Ubuntu Servers :: Access The Data In .fbd Data File

Feb 19, 2011

We purchased a new database system at work last October, ditching the old system because of a lack of support from the vendor. This is a retail Point of Sale and Backoffice database system. I am not sure what system the new one runs on, but the system we replaced was a Firebird data base. The reason I am posting is because we are now in need of the information contained in the old database which was not completely imported into the new system.

Basically the problem is this: The database in on a Windows XP system and I found a copy of SQL Manager Lite 2008 on the system, which after quite a bit of studying, I figured out how to extract the database into a removable file. I have this file (178MB) on a USB stick in a file called Backoffice.fbd.

My studying suggests to me that I can get into this database with MySQL. I have never used this and have no clue how to do this. All I want to be able to do get into the database and create tab deliminated spreadsheet files for each of the database sections (Customers, Repairs, Sales History, stock files, etc.) Is it possible to do this with Ubuntu and MySQL and if so, can expert suggest one or two things to get me started. While a guided tutorial would be nice because I am not an expert, I am willing to learn on my own if someone could point me in the right direction.

View 3 Replies View Related

Server :: Hange The Owner Name Of Some Files But When Use "chown"?

Jun 30, 2010

I am trying to change the owner name of some files but when I use "chown" they keep changing for other different user name(postgres):

Code:
[root@server root]$ls -l
-rw-r--r-- 1 root root 3911 Nov 2 2008 test1
[root@server root]$chown newuser test1
[root@server root]$
[root@server root]$ls -l
-rw-r--r-- 1 postgres root 3911 Nov 2 2008 test1

How I would fix this, I tried to change the bashrc but I couldn't

View 2 Replies View Related

General :: Make Arithmetic Operation Of Data File With Script File?

Aug 31, 2010

I wonder how to arithmetic operation of our data file using any script program/command (like sed, cut,awk)for example my data.file is:

45 65 42
12 23 61
43 34 21

I want to multiply first column with 2 and add second column with 3 then it become

90 68 42
24 26 61
86 37 21

View 5 Replies View Related

General :: Data From Input File To Be Taken And Send To Output File?

Jul 24, 2010

I am new to shell scripting.What i am trying is to write a shell script which take the input file and output should like as mentioned below.Output file should have data till SOK (marked in red)from every second line and then the selected data(marked in green) from 4th line.So selected data from 2nd and 4th line in one line of O/P file and then similarly selected data from 6th and 8th line in second line of O/P file.Input File:

3c3
< c1111;11.11.11.11;pOK;SOK:abcde;Universe:aa
---

[code]...

View 14 Replies View Related

Ubuntu :: Using Chown With Cat?

Jul 21, 2011

I have a list specific list of dirs/files that need to be changed into another users name.I initially thought that this would work:chown -Rc user.name 'cat user.name1.txt' but I get chown: cannot access 'cat user.name1.txt No such file or directory

View 2 Replies View Related

OpenSUSE :: Can't Chown Windows In 11.1

Feb 6, 2010

I've got a bit of an issue here. I'm running OpenSUSE 11.1 with an old Windows XP drive slaved on the secondary cable. Works just find, as long as I sudo mount it (sudo mount /dev/sdb1 /windows/C) and I can access everything I have on the drive; this is not the issue. The issue is that I have another drive that I want to sync up. Eh, this needs to be a bit clearer.

When I have /windows/C mounted, it shows a padlock on the C drive, but not windows folder. (/windows/C). I have a dedicated entry in / to allow windows to work. I have maybe 25 folders in my Music folder that I want to sync to my /C drive, as I plan to re-install Suse on a bigger drive, and don't want to lose this music.

Upon su *password* into root, I can ls -l and I get
Code:
ls -l
total 32
drwxr-xr-x 26 root root 32768 1969-12-31 17:00 C

[Code].....

The reason I want to get this stuff transfered over is because I'm running out of room on my smaller drive and I figure I may as well utilize a 200GB HDD for something besides a paperweight. I know this drive will work, but I don't want to lose my current data that exists on my smaller drive. (I think my current drive is a 40? Not completely sure right now)

View 3 Replies View Related

Ubuntu :: Chown And Skip Dot And Dot-dot?

Mar 5, 2011

I issued chown '-hR <user>:<group> *' on a directory. chown also change dot and dot-dot in cwd and all subirectories. How do I go about recursively changing ownership without changing dot and dot-dot?

View 2 Replies View Related

General :: How To Use Chown Command

Jan 12, 2010

My home/container has me as the owner but the contents all belong to root...I've tried >chown cbjhawks /home/cbjhawks but that didn't change anything. Should it be >chown -R cbjhawks /home/cbjhawks? Or what is the proper command for doing this...

View 2 Replies View Related

General :: Why Are 'chown' And 'chgrp' Not Working

Feb 12, 2011

I've just installed Ubuntu 10.10 AMD-64 and mounted several partitions into /mnt/ directory. Now I want to be able to perform operations on those partitions without limitations. I'm trying to change the owner and group but it doesn't work. I'm typing sudo chown username filename to perform the operations.

View 1 Replies View Related

Ubuntu :: Can't Use Sudo After Chown -R User /usr/

Jan 12, 2011

title says it all. I know, I know, a recursive chown, what was I thinking. It was late.

I just straight up:

sudo chown -R user /usr/


Now I can't `sudo', error is "authentication failure".

View 1 Replies View Related

General :: CHOWN All Folders Within A Folder?

Feb 9, 2011

I would like to change the ownership of some all folders and files within them folders by making changes to parentfolder. But I mess it up.

The folder path is /home/myaccount/shared/target_folder.

Target folder holds several new folders with files inside. How can I easily change ownership to all folders and files within target_folder?

I tried this:
Code: sudo chown myusername /home/myusername/shared/target_folder But I get error:

Unnable to resolve. No such file or directory.

View 5 Replies View Related

General :: Include The Subdirectories In A Chown?

Jul 19, 2010

When I installed a new copy of my distro on another partition, in order to preserve all the settings from my old my user account, I made a user account with the same name on the new installation, and then copied my old user account's files (in their entirety) to the new user account, overwriting it. I did the copying from the root account (where else? I assume the new user account can't overwrite itself while it's open), and root became the owner of everything I copied, making it impossible to open the new user account. So I then chowned the new user account's folder to myself. I still can't get in, because apparently, chown only chowned the top folder, leaving all subdirectories owned by root. How do I make chown include all subdirectories? I scanned the man page, but didn't see a parameter.

View 4 Replies View Related

Server :: Make Two Storage Server Mirror Data In Real Time?

Jan 15, 2011

I have 2 servers each one with a RAID and I want them mirror they data so if one of them goes down the other one take the job with out disruption. I've heard of multipath by I want to know it in detail or learn of more options.

View 2 Replies View Related

Server :: Memory Peak Caused Server Crash - Data Interpretation?

Dec 16, 2010

Last week my server crashed. I'm trying to diagnose the cause.

This is the relevant error message in /var/log/messages:

Code:

I'm assuming that I can conclude, then, that apache/httpd was the cause of the memory leak?

Next, I've been tracking my memory usage. Using top, this is an average memory load level for my server:

Code:

I'd like to confirm if my understanding of this data is correct, because Plesk indicates that my memory usage is only 50% or less. (Though I have read a number of reports indicating that Plesk's measurements are frequently wrong.)

Top says: Of the 2,073,156K total memory, 1,982,572K (95.63%) is being used, 90,584K (4.37%) is free. Of that sum, 421,948K (20.35%) are being used as buffers. Additionally, of the 2,096,472K of Swap, 60K is used, and 887,700K (42.34%) is cached.

My questions: Is my memory actually being 95% used? Or is the buffered quantity (20.35%) not a use of physical/virtual memory? (i.e. is it disk usage?) Does the amount of cached Swap influence the percentage of physical/virtual memory being used?

In other words, who is correct? Plesk says I'm using 40-50% of my memory, whereas top says 85-95%.

View 6 Replies View Related

Server :: Unable To Copy Data To Remote Server Using Ncftp Command

Jul 16, 2011

I am unable to use ncftp command I have defined all variables used. i have to copy the data to another server FTPS. When i am executing this command it is throwing error

ncftp -u : option unknown

I am copying total script what i am executing in my server. Please some one tell me is there any pistake in using the ncftp command , or tell me some other commands to copy data to remote server

BAK="/opt/DBbackups"
NOW=$(date +"%d-%m-%Y")
FTPU="username"
FTPP="password"

[code]....

View 6 Replies View Related

CentOS 5 Server :: Openssh 5.8p2 - Transfer Data From Other Server Through Scp It Gives Connection Refused?

Aug 1, 2011

I have configured openssh 5.8p2 with centos 5.6. My sftp is working fine with chroot environment but i am having problem with SCP. I am dealing with muliti Redhat servers. When i try to transfer data from other linux server through scp it gives connection refused. For e.g ssh 5.8 is configured on new server and i want to transfer files from old server which is using openssh 4.3 version.i created same username and password on new server as on old server.My sftp users on new server has no shell access but only sftp access. When i try to scp from old server to new server it gives error connection refused. Is the below configuration only for sftp and can't scp? According to google the configurations i found are for scp and sftp. Do i need to generate ssh keys by giving users on new server shell access, once created then stop shell access again, as i dont want to give shell access permanent for security reasons? but i want to use ssh keys for more security as well.

Port 22
PermitRootLogin no
1.override default of no subsystems[code].....

View 5 Replies View Related

Server :: Mail Server Blocks: Warning: Numeric Domain Name In Resource Data Of MX Record

Feb 4, 2010

My test messages from one mail server to another are getting sent to my spambucket and the only error in the logs is: warning: numeric domain name in resource data of MX record for [URL]: 74.63.64.42

View 1 Replies View Related

Fedora :: Umask, Chown, Chgrp And Other Commands?

Feb 7, 2010

ok so im working on homework and im not understanding what my teacher is wanting me to do and i dont have time to email him seeing as he might not read it until tomorrow. so ill copy and paste and if anyone can better explain it,

2) Use the umask command to change your file creation mask such that,by default for new files and directories you create, no permissions are taken away from the 'user' (owner), write permissions are taken away from the 'group' (group owner), and all permissions (read, write and execute) are taken away from 'other'. Take a screenshot of your terminal window showing the results of this step.

3) Use the touch command to create a new file called testfile. Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.

4) Use the chown command to change the user associated with testfile (the owner) to cint201. Take a screenshot of your terminal window showing the results of this step.

5) Use the chgrp command to change the the group associated with testfile (the group owner) to users. Take a screenshot of your terminal window showing the results of this step.

6) Use the chmod command to change the permissions for testfile such that the 'user' (owner) permissions are set to read, write and execute, the 'group' (group owner) permission are set to read and execute, the 'other' permissions are set to grant neither read, write nor execute, and finally set the SUID bit for the file. Take a screenshot of your terminal window showing the results of this step.

7) Use the ls command to display the contents of your current directory in long mode. Take a screenshot of your terminal window showing the results of this step. Ensure that the directory listing for testfile is completely visible in your screenshot.

View 8 Replies View Related

General :: Vsftpd Chown Upload Permissions?

Mar 30, 2011

vsftpd 2.3.2-3After user uploaded a file it has -rw-------(0600) permissions. Of course user can change permissions manualy to any he likeBut how to set for example 0700 by default?

View 1 Replies View Related

Ubuntu :: Chown As Non-root User (with Authentication)?

Sep 19, 2010

I am currently responsible for administering a shared Ubuntu machine with several unrelated users. Some of these users own multiple accounts and would like to "chown" files between them. Currently, I must handle such requests manually, and this is inconvenient.

I am looking for a way to allow non-root users to chown files with authentication (i.e. prompt for the password of the user to which ownership is being set to). This would prevent an exploit such as:

Quote:
cp /bin/bash ~/sudobash
chmod 4777 ~/sudobash
chown root:root ~/sudobash

Does such a solution exist?

View 2 Replies View Related

Ubuntu :: Chown On SD Card - Operation Not Permitted?

Dec 16, 2010

I am trying to modify the user and group for a directory on my SD card, but I get an "Operation not permitted" error even when I'm signed in as root. I have the SD card auto mounted using:

Code:
root@ubuntu:/media# cat /etc/fstab
/dev/mmcblk0p1 /media/sd vfat auto,user,dmask=0000,fmask=0111 0 0

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved