Ubuntu :: Logon Script - Create A File (if It Doesn't Already Exist) And Checks The File For Some Info

May 24, 2010

I want to create a logon script (or somesuch) that creates a file (if it doesn't already exist) and checks the file for some info otherwise. If it finds a given trigger in that file, it logs into a local database and does some operations.

Now my problem isn't with creating that file or even getting it to function as a logon script -- it's with permissions. After the logon script creates the file, I want that user to have read access on it ONLY. Further, I don't want to give the user any kind of root access so that they could do the database operations in question or chown/chmod the file.

What's the best practice here? I'm noticing that whenever the script runs (in .bashrc right now) the script runs with the current user's permissions. Ideally, I'd like to make it so the login script can run at a higher level of permissions, (higher than the user has). Is this even possible? What's the best way to do this?

View 1 Replies


ADVERTISEMENT

Ubuntu :: Unable To Create Trashing Info File: Read-only File System

Jul 21, 2010

I plugged in my USb drive into my computer yesterday and tried to delete a folder. I was unable to do so and got the following message

Cannot move file to trash, do you want to delete immediately? The file "my file" cannot be moved to the trash. Show Details Unable to create trashing info file: Read-only file system

So when I click on delete I get another error message:

Error while deleting.
There was an error deleting Case Study Database. Show Details Error removing file: Read-only file system

At this point I can only click on Skip, Skip All, or Cancel.

I have not changed anything on the stick recently so I dont know what is causing the problem.

View 7 Replies View Related

General :: Move A File To Some Path And Create That Path When It Doesn't Exist?

Oct 8, 2010

I use this command:

Code:

find ./ -atime +360

to figure out the files that haven't been accessed since 360 days. The command above will return results like this:

Code:

/uploads/2010/02/some-file-name.ext
/uploads/2009/08/another-file-name.ext
... etc

I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:

Code:

mv /uploads/2010/02/some-file-name.ext /old-files/uploads/2010/02/some-file-name.ext

But I want the executed command to create this path

Code:

/old-files/uploads/2010/02/

If it doesn't exist.

View 6 Replies View Related

General :: Limit On File Size - Doesn't Allow User To Create File Which Are Greater Than 100Kb

Jun 13, 2011

I was just testing specifying limit on file size to a user and have added the following to /etc/security/limits.conf bob soft fsize 100 This basically should have said not to allow bob to create anyfile greater than 100Kb in size.

But the interesting thing is, if bob already has any file which is greater than 100Kb in size, it even doesn't allow to log him into the system both from console and SSH. Also nothing is logged in logs.. How do I configure it so that, bob can login to the system even though he has any file greater than 100Kb (but doesn't allow him to create file which are greater than 100Kb) ??

View 3 Replies View Related

Fedora :: Why Config.h File Doesn't Exist

Jul 30, 2010

i was assigned with a project to analyse the performance of ASSP mail filter engine.I am using Fedora 7 with KDE3.5. I need to install a lot of perl modules to run the assp.pl code.I was trying with all sorts of packages like src.rpm, ixxx.rpm, tar.gz, tar.bz2. All these packages doesnt work exactly. When i tried with rpm packages. I am getting this error.

/*
[root@localhost RPMs]# rpm -ivh cyrus-sasl-2.1.23-9.fc12.src.rpm
warning: cyrus-sasl-2.1.23-9.fc12.src.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 57bbccba
1:cyrus-sasl warning: user mockbuild does not exist - using root

[code]....

So i checked for config.h file as given the directory but it was missing.I don't know why?

View 4 Replies View Related

General :: Command Line - Create Directories That Don't Exist While Creating A New File?

May 8, 2010

I can do:mkdir messages and then: touch messages/hello.txt Is there a command that will do both - create the directory if it doesn't exist, and then the empty file? Something like: touch -p messages/hello.txt

View 1 Replies View Related

General :: Executable File Apparently Doesn't Exist When Trying To Execute With Bash

May 9, 2011

I downloaded a program called tonespace http://www.mucoder.net/en/tonespace/ which I extracted and then tried to execute the executable file with ./tonespace. This gives me the following message:

bash: ./tonespace: No such file or directory

When I use the command: file ./tonespace I get this: tonespace: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

I dont get it. The file is clearly there, yet when trying to execute it bash doesn't seem to recognize it.

It has permissions rwxr-xr-x and is not owned by root. Am I overlooking something?

View 2 Replies View Related

Ubuntu :: Can't Install Update-info-dir File Is Missing From /var/lib/dpkg/info/?

Aug 6, 2010

so i cannot install anything because update-info-dir file is missing from /var/lib/dpkg/info/ .. I've searched for the last day and a half for a way to fix this, but nothing. can't even update dpkg because of this. so how do I bypass or fix this so I can install stuff (this is a fresh install of ubuntu 10.04 lts Lucid Lynx).

View 9 Replies View Related

Ubuntu :: Archive Manager Create The Specified Directory If It Doesn't Exist?

Feb 16, 2010

Is it possible to have Archive Manager create the specified folder when I enter it into the path field? Like if I want to put something in "/Main/Sub1/Sub2" But "sub2" doesn't exist, can I just have Archive Manager create it and put the files there?

View 1 Replies View Related

General :: Scp - Error "file Doesn't Exist"

Feb 18, 2010

I'm trying to use scp to get a file from my desktop onto the server for my school. I'm connected via VPN and using PuTTy to try to do this. I've tried every single combination/permutation/help site on the web that I can think of and I still can't get this thing working. This is what I get:

[palermo@matrix hw2]$ scp synoptic.data palermo@matrix:/rhome/palermo/ats652/hw2
palermo@matrix's password:
synoptic.data: No such file or directory

Yet the file sits, in all it's glory, on my desktop. What have I missed here? This is for a homework due next week, so the urgency is kind of on.

View 5 Replies View Related

General :: Given A File Path Search For File Exist?

Jan 27, 2011

I have file which consists of many files with their path,i need to check for the file exists in the given path,how to check?

View 12 Replies View Related

Ubuntu :: Those Annoying File System Checks?

May 19, 2010

I have my Media Center running Ubuntu 10.04, and it's annoying to have that "Your disk drives are being checked for errors" message every so often. And ofcourse, as Murphy's law states, it usually happens when I'm in a hurry to quickly watch something.

Ofcourse, I can press 'C' (cancel) all the time. But I guess Ubuntu set up this file check interval for a reason, right? I was wondering if it's save to change the interval so it's less often. Or is it easy to configure the check to occur at SHUTDOWN? That's when most people don't care what the computer does anymore.

Also, although it's a pretty fresh install, any Ubuntu on my machine has never ever ever ever worked flawlessly and neither does this one. More often then not, on shutdown, the computer doesn't shut down but just sits there with a black screen or with the ubuntu logo. So I just power it off. Does this scenario make it unwise to tone down on the number of file checks?

View 9 Replies View Related

Ubuntu :: When Create On Windows A Text File In Greek - It Doesn't Recognize It

Jun 3, 2010

When I create on windows a text file in Greek, It doesn't recognize it with Ubuntu... So I created a script:

Code:
#!/bin/bash
fileName="$@"
fileNoExt=$(basename "$fileName")
fileType=$(file "$fileNoExt")

[Code]....

View 1 Replies View Related

Ubuntu :: File Checks Fail For /home Partition?

Feb 28, 2010

I have a dual boot with Arch linux that share a /home partition. Whenever ubuntu starts tho it tries to do a check on the /home partition and fails.... it gets an error saying unable to check then drops into a shell. I have to run it in recovery mode frequently then start it up and it usually works, but i have to type startx after logging into a shell before that

View 8 Replies View Related

General :: Use The 'at' Command To Run A File That Checks ALL Process

Jun 26, 2011

I'm trying to use the 'at' command to run a file that checks ALL process running at 5:00pm and does a system load check? Any advice on where to start?

View 7 Replies View Related

Ubuntu :: "Can't Load Image From File '/usr/share/firefox/icons/mozicon128.png': File Does Not Exist."

Apr 12, 2010

Tried running simdock from software center...uninstalled because I was getting this error after trying to run ap "Can't load image from file '/usr/share/firefox/icons/mozicon128.png': file does not exist."

View 3 Replies View Related

Ubuntu :: Mounting Windows File On Logon?

Feb 2, 2010

I have active directory users. User can log on with username/password from active directory in ubuntu. Users have their directory on Windows file server. They have read and execute rights on file on windows file server with same username and password from active directory(192.168.2.1/file/username for each user). I want that user's directory on windows file server mount to /home/username/disk on logon for each user, which logon in ubuntu.

View 1 Replies View Related

Ubuntu :: Is There Any Program / Script That Can Create Torrent File For Each File In Directory?

Apr 14, 2010

Is there any program/script that can create a torrent file for each file in a directory? I have been looking all over but can't seem to find anything of the sort. I have 700+ files I REALLY don't want to make my self.

View 1 Replies View Related

Ubuntu / Apple :: Failed To Create File '/root/.local/share/recently-used.xbel.AC7YXV': No Such File Or Directory

Jun 22, 2011

I have iMac 2.4GHz with rEFIT installed. I installed Unity on one of the partition. Kernel is still 2.6.38.8. I am getting error message when I run the command
sudo gedit /etc/x11/xorg.conf

The error message is

(gedit:2139): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.AC7YXV': No such file or directory

(gedit:2139): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

View 3 Replies View Related

Debian :: NTFS Backup - Create Ever Expanding (to 320Gb) TAR File That Will Retain All Original File Permissions

Sep 20, 2015

I want to back up an entire Linux system on a 3Tb external Western DIgital USB3 drive.

I do not want to reformat it from what it is, apparemtly NTFS.

Is there a utility that can act like a file manager like mc, that will permit me to create an ever expanding (to 320Gb) TAR file that will retain all the original file permissions. I have had nothing but disappointment with Linux backup utils with a FAT32 external drive, and I am concerned if I just try an tar the entire drive at once, with around 3 million files, I might run out of memory.

View 5 Replies View Related

Fedora :: Cannot Create Regular File Read Only File System?

Jun 16, 2009

All my torrents go to my home/username/Download/ folder, I could read/write yesterday but now I cant even copy the files to a flash drive.The error i get is "Cannot create regular file '/home/username/Download/file' : Read only file system.

View 14 Replies View Related

General :: Vsftp Cannot Upload File / Error 553 Cannot Create The File

Jul 26, 2010

I am testing my ftp server configuration.Anonymous download works , however anonymous upload does not.I am getting the following error message from both Windows and Linux 5.4clients : 553 cannot create the file.And i am running Fedore 12.

View 3 Replies View Related

Ubuntu :: When Open Any .pps File With OO.org (impress), It Starts A Slideshow And It Doesn't Let Edit The File?

Aug 24, 2010

When i open any .pps file with OO.org (impress), it starts a slideshow and it doesn't let me edit the file. If i click on "end slideshow", the program exits.i ran it in a terminal and there's no error messages.[EDITED]Well, i found the answer, just renaming it to ".ppt".

View 2 Replies View Related

Ubuntu :: Boot File - Workstation Doesn't Find A File - VMmon

Aug 15, 2010

In Ubuntu 10.04 I installed VMware workstation 7.1 to run a VM - everytime I need to run it though, Workstation doesn't find a file (VMmon) and I need to run in terminal this command: sudo /etc/init.d/vmware start

How can I add this in the boot file so it starts automatically and I do not have to run it manually -

View 1 Replies View Related

General :: Create Device File For Image File?

Sep 8, 2010

Everything in Linux is a file, right? And everything can be represented by a file? Is there some way I could create a block device file that represents (i.e., provides an interface to) this image file? If so, then I could use fdisk on the device file to split it into partitions, format the partitions, and then mount them as directories. I could create a file system within a file system, which would be fun.

View 2 Replies View Related

Programming :: Create A Duplicate File Of A Text File In PHP?

Nov 11, 2010

What I plan to do is, create a duplicate file of a text file, and then append some text into the new text file.

View 1 Replies View Related

Software :: Example File Does Not Exist

Jan 5, 2010

I installed LyX to try it out and the built-in tutorial wants me to play around with the file "example_raw.lyx", but I can't find it anywhere!

View 7 Replies View Related

Fedora :: How To Run The File Info.php

Jun 10, 2011

i had just install apache , mysql and php 5...apache is starting from localhost but how to test php ?

i created a file named as " info.php " which contain the foll code <? php phpinfo(); ?> but i m confuse how to save it in " var/www/html/ " which is a root directory of apache and from where we can acess the info.php files by http://localhost/info.php

how to run the file info.php ?

View 5 Replies View Related

Ubuntu :: Any Way To Unlock File Info In Koala?

Jan 8, 2010

Is there any way to "unlock" file info in Koala to become visible in the properties of that file? For example, when opening an .mp3 in VLC and checking the information, I am able to see and edit extra info that I do not see when simply right clicking the file and selecting properties. Another example is that GIMP saves comments to images, but I have nowhere to view these comments once they are saved. I would like to see more info when checking the properties of a file, dare I say like Windows enables users to. So is there a terminal code or plugin that I can install?

View 2 Replies View Related

Ubuntu Multimedia :: How To Get File Info With Mplayer

Feb 1, 2010

what do i need to write to get the mediafile info from mplayer?

View 6 Replies View Related







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