Search Results

Search found 70915 results on 2837 pages for 'file permissions'.

Page 22/2837 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How to add extensions to a lot of files using content of each file?

    - by v8media
    I've got over 10,000 files that don't have extensions from older versions of the Mac OS. They're extremely nested, and they also have all sorts of strange formatting and characters. They don't have file types or creator codes attached to them any longer. A great deal of these files have text in the file that will let me determine extensions (for example Word.Document.8 is in every file created by that version of Word, and Excel.Sheet.8 in every file created with that version of Excel). I found a script that looks like it would work for one of these file types at a time, but it erases parts of filenames after nefarious characters, which is not good. find . -type f -not -name "." -print0 |\ xargs -0 file |\ grep 'Word.Document.8' |\ sed 's/:.*//' |\ xargs -I % echo mv % %.doc So, two questions from that: One is, should I clean the characters in the filenames first, or programmatically deal with those in the script in order to leave them the same? As long as I lose no information from the filenames, I don't see a problem cleaning out slashes and other problem characters. Also, if I clean the filenames, there are likely to be duplicates, so any cleaning script would have to add something like "-1" before the extension to make sure nothing gets lost. 2nd question is how do I change the script so that it will look for more than one file type at the same time and give each the proper extension? I'm not tied to this script, but it is understandable, which is a pro. Mac OS X 10.6 is installed on this file server, but I've got access to any recent versions of OS X. Thanks, Ian

    Read the article

  • Advanced Linux file permission question (ownership change during write operation)

    - by Kent
    By default the umask is 0022: usera@cmp$ touch somefile; ls -l total 0 -rw-r--r-- 1 usera usera 0 2009-09-22 22:30 somefile The directory /home/shared/ is meant for shared files and should be owned by root and the shared group. Files created here by usern (any user) are automatically owned by the shared group. There is a cron-job taking care of changing owning user and owning group (of any moved files) once per day: usera@cmp$ cat /etc/cron.daily/sharedscript #!/bin/bash chown -R root:shared /home/shared/ chmod -R 770 /home/shared/ I was writing a really large file to the shared directory. It had me (usera) as owning user and the shared group as group owner. During the write operation the cron job was run, and I still had no problem completing the write process. You see. I thought this would happen: I am writing the file. The file permissions and ownership data for the file looks like this: -rw-r--r-- usera shared The cron job kicks in! The chown line is processed and now the file is owned by the root user and the shared group. As the owning group only has read access to the file I get a file write error! Boom! End of story. Why did the operation succeed? A link to some kind of reference documentation to back up the reason would be very welcome (as I could use it to study more details).

    Read the article

  • Python file-io code listing current folder path instead of the specified

    - by Tom Brito
    I have the code: import os import sys fileList = os.listdir(sys.argv[1]) for file in fileList: if os.path.isfile(file): print "File >> " + os.path.abspath(file) else: print "Dir >> " + os.path.abspath(file) Located in my music folder ("/home/tom/Music") When I call it with: python test.py "/tmp" I expected it to list my "/tmp" files and folders with the full path. But it printed lines like: Dir >> /home/tom/Music/seahorse-gw2jNn Dir >> /home/tom/Music/FlashXX9kV847 Dir >> /home/tom/Music/pulse-DcIEoxW5h2gz This is, the correct file names, but the wrong path (and this files are not either in my Music folder).. What's wrong with this code?

    Read the article

  • How to know file type without extension

    - by Ayusman
    While trying to come-up with a servlet based application to read files and manipulate them (image type conversion) here is a question that came up to me: Is it possible to inspect a file content and know the filetype? Is there a standard that specifies that each file MUST provide some type of marker in their content so that the application will not have to rely on the file extension constraints? Consider an application scenario: I am creating an application that will be able to convert different file formats to a set of output formats. Say user uploads an PDF, my application can suggest that the possible conversion formats are microsoft word or TIFF or JPEG etc. As my application will gradually support different file formats (over a period of time), I want my application to inspect the input file instead of having the user to specify the format. And suggest to user the possible formats of output. I understand this is an open ended, broad question. Please let me know if it needs to be modified. Thanks, Ayusman

    Read the article

  • Will git-svn send file permission changes to a SVN repository?

    - by theForce
    I'm using git-svn in a svn environment. When i check out .sh files they do not get the +x flag. So i change that manually, but now git tells me the file has been modified. My question is: If i'd stage + commit those +x changes, will git push them to the svn server when i "git svn dcommit"? This is not what i want, i just want git to 'memorize' the +x changes locally but not to try to send file permission changes to the svn repository.

    Read the article

  • Read a file to multiple array byte[]

    - by hankol
    I have an encryption algorithm (AES) that accepts file converted to array byte and encrypt it. Since I am going to process a very big size files, the JVM may go out of memory. I am planing to read the files in multiple array byte. each containing some part of the file. Then I teratively feed the algorithm. Finally merge them to produce encrypted file. So my question is: there any way to read a file part by part to multiple array byte? I thought I can use the following to read the file to array byte: IOUtils.toByteArray(InputStream input). And then split the array into multiple bytes using: Arrays.copyOfRange(). But I am afraid that the first code that reads file to byte will make the JVM to go out of memory. any suggestion please ? thanks

    Read the article

  • VFS: file-max limit 1231582 reached

    - by Rick Koshi
    I'm running a Linux 2.6.36 kernel, and I'm seeing some random errors. Things like ls: error while loading shared libraries: libpthread.so.0: cannot open shared object file: Error 23 Yes, my system can't consistently run an 'ls' command. :( I note several errors in my dmesg output: # dmesg | tail [2808967.543203] EXT4-fs (sda3): re-mounted. Opts: (null) [2837776.220605] xv[14450] general protection ip:7f20c20c6ac6 sp:7fff3641b368 error:0 in libpng14.so.14.4.0[7f20c20a9000+29000] [4931344.685302] EXT4-fs (md16): re-mounted. Opts: (null) [4982666.631444] VFS: file-max limit 1231582 reached [4982666.764240] VFS: file-max limit 1231582 reached [4982767.360574] VFS: file-max limit 1231582 reached [4982901.904628] VFS: file-max limit 1231582 reached [4982964.930556] VFS: file-max limit 1231582 reached [4982966.352170] VFS: file-max limit 1231582 reached [4982966.649195] top[31095]: segfault at 14 ip 00007fd6ace42700 sp 00007fff20746530 error 6 in libproc-3.2.8.so[7fd6ace3b000+e000] Obviously, the file-max errors look suspicious, being clustered together and recent. # cat /proc/sys/fs/file-max 1231582 # cat /proc/sys/fs/file-nr 1231712 0 1231582 That also looks a bit odd to me, but the thing is, there's no way I have 1.2 million files open on this system. I'm the only one using it, and it's not visible to anyone outside the local network. # lsof | wc 16046 148253 1882901 # ps -ef | wc 574 6104 44260 I saw some documentation saying: file-max & file-nr: The kernel allocates file handles dynamically, but as yet it doesn't free them again. The value in file-max denotes the maximum number of file- handles that the Linux kernel will allocate. When you get lots of error messages about running out of file handles, you might want to increase this limit. Historically, the three values in file-nr denoted the number of allocated file handles, the number of allocated but unused file handles, and the maximum number of file handles. Linux 2.6 always reports 0 as the number of free file handles -- this is not an error, it just means that the number of allocated file handles exactly matches the number of used file handles. Attempts to allocate more file descriptors than file-max are reported with printk, look for "VFS: file-max limit reached". My first reading of this is that the kernel basically has a built-in file descriptor leak, but I find that very hard to believe. It would imply that any system in active use needs to be rebooted every so often to free up the file descriptors. As I said, I can't believe this would be true, since it's normal to me to have Linux systems stay up for months (even years) at a time. On the other hand, I also can't believe that my nearly-idle system is holding over a million files open. Does anyone have any ideas, either for fixes or further diagnosis? I could, of course, just reboot the system, but I don't want this to be a recurring problem every few weeks. As a stopgap measure, I've quit Firefox, which was accounting for almost 2000 lines of lsof output (!) even though I only had one window open, and now I can run 'ls' again, but I doubt that will fix the problem for long. (edit: Oops, spoke too soon. By the time I finished typing out this question, the symptom was/is back) Thanks in advance for any help. And another update: My system was basically unusable, so I decided I had no option but to reboot. But before I did, I carefully quit one process at a time, checking /proc/sys/fs/file-nr after each termination. I found that, predictably, the number of open files gradually went down as I closed things down. Unfortunately, it wasn't a large effect. Yes, I was able to clear up 5000-10000 open files, but there were still over 1.2 million left. I shut down just about everything. All interactive shells, except for the one ssh I left open to finish closing down, httpd, even nfs service. Basically everything in the process table that wasn't a kernel process, and there were still an appalling number of files apparently left open. After the reboot, I found that /proc/sys/fs/file-nr showed about 2000 files open, which is much more reasonable. Starting up 2 Xvnc sessions as usual, along with the dozen or so monitoring windows I like to keep open, brought the total up to about 4000 files. I can see nothing wrong with that, of course, but I've obviously failed to identify the root cause. I'm still looking for ideas, since I definitely expect it to happen again. And another update, the next day: I watched the system carefully, and discovered that /proc/sys/fs/file-nr showed a growth of about 900 open files per hour. I shut down the system's only NFS client for the night, and the growth stopped. Mind you, it didn't free up the resources, but it did at least stop consuming more. Is this a known bug with NFS? I'll be bringing the NFS client back online today, and I'll narrow it down further. If anyone is familiar with this behavior, feel free to jump in with "Yeah, NFS4 has this problem, go back to NFS3" or something like that.

    Read the article

  • Inheriting list item permissions via permissions on lookup field item

    - by Dan Sydner
    Say you have two lists in Sharepoint, let's call them "house" and "region". Each house is assigned to a region via a lookup field. List item permissions are set on regions. Now I want the users only to only see the houses which belong to the regions they have read access to. I reckon it should be relatively simple I see no easy way of doing this. Am I over looking something.

    Read the article

  • Why does key-based ssh fail even after setting up the authorized_keys file on the remote host?

    - by Brad Grissom
    These details don't matter but I am on a Ubuntu 12.04 machine and I want to ssh into my RaspberryPi without a password. I followed the standard procedure for setting up ssh without a password: local $ ssh-keygen -t rsa (hit enter for defaults to the questions) local $ scp ~/.ssh/id_rsa.pub matt@raspihost:~/.ssh/authorized_keys I logged onto the raspihost and checked all my permissions on ~/.ssh/ and on the authorized_keys file itself. It was still not working!

    Read the article

  • FTP client says directory permissions are 0000

    - by nnnmmm
    I encountered a problem that appears to be related to permissions (same as this one). When I looked at the permissions of various directories in FireFTP, they all were 0000, which is obviously nonsense, since all the other pages are served without any problems. I only have ftp access, and I think it’s a Windows server (The header says "Server: Microsoft-IIS/7.5"). I’ve tried a different ftp client, with the same result. Changing the permissions results in a "'SITE CHMOD 764 [directory]': command not understood" error. A search on Google and SO for "permissions windows 0000" and similar queries didn’t turn up anything. How can I view and change the actual permissions?

    Read the article

  • Executing a process in windows server 2003 and ii6 from code - permissions error

    - by kurupt_89
    I have a problem executing a process from our testing server. On my localhost using windows XP and iis5.1 I changed the machine.config file to have the line - I then changed the login for iis to log on as local system account and allow server to interact with desktop. This fixed my problem executing a process from code in xp. When using the same method on windows server 2003 (using iis6 isolation mode) the process does not get executed. Here is the code to execute the process (I have tested the inputs to iecapt through the command line and an image is generated) - public static void GenerateImageToDisk(string ieCaptPath, string url, string path, int delay) { url = FixUrl(url); ieCaptPath = FixPath(ieCaptPath); string arguments = @"--url=""{0}"" --out=""{1}"" --min-width=0 --delay={2}"; arguments = string.Format(arguments, url, path, delay); ProcessStartInfo ieCaptProcessStartInfo = new ProcessStartInfo(ieCaptPath + "IECapt.exe"); ieCaptProcessStartInfo.RedirectStandardOutput = true; ieCaptProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden; ieCaptProcessStartInfo.UseShellExecute = false; ieCaptProcessStartInfo.Arguments = arguments; ieCaptProcessStartInfo.WorkingDirectory = ieCaptPath; Process ieCaptProcess = Process.Start(ieCaptProcessStartInfo); ieCaptProcess.WaitForExit(600000); ieCaptProcess.Close(); }

    Read the article

  • batch file command to run jar file

    - by Arivu2020
    I am created jar file.The jar file is an executable one.But how can i run the jar file from the out side,using created batch file.I want to know the batch file coding to run the jar file without mentioning class path. Or is there any way to do it?

    Read the article

  • Using the Drop Box folder while sharing on Mac OS X, files are locked.

    - by vgm64
    While using the Drop Box in the Shared folder on two MacBook Pros running Mac OS X 10.6, I noticed that when files were dropped into the drop box they were read only (locked?) when going from one of the laptops to the other (but not necessarily the other direction). Is there a way to change this? My girlfriend nearly had an aneurism because she couldn't rename a file. I duplicated it and deleted the original, but this seems unnecessary. I remember the permissions on the file were: nobody: Read Only everyone: Read Only

    Read the article

  • windows 7 file permission problem

    - by user20989
    i download one zip folder and extract it in windows 7. after extracting it shows file names with green color. now when i try to open any file, it give error access denied. even i set the permission on that file for full control, same error is coming. if i extract same folder in windows vista or xp no error. actually attribute of file is AE and when i right click on file and then select properties-- general-- advance -- encrypt contents to secure data is selected. if uncheck this option i can't apply it again gives error permission denied. Thanks

    Read the article

  • No write access on Windows 2008 workgroup share

    - by Serge - appTranslator
    Hi All, I'm trying to access network shares on my new Windows 2008 server (workgroup) using my server's local admin account. I can read files but not modify them. Permissions (sharing + file system) say: Users = Read only. Admins = Full Control. Even though I connect using my admin account (net use x: \\server\share /user:server\me), I can't write. OTOH, I have another share on the same computer where users have Read AND Write. I can write into that one. What's the problem? Does it have to do with UAC? TIA for your help.

    Read the article

  • Which program is locking all my executable files?

    - by Tom Wijsman
    When updating any software product, as well as manually trying to replace .exe files, it says that access is denied to the file and in fact the System process is holding a handle to the file when I check it with Process Explorer. This must be a driver or something that is malfunctioning was my first though, but now I wonder how I figure out which driver / program is doing this and why it is so. Unlocker doesn't seem to be working for me, unless someone can tell me how to use it properly other than making it appear a magical wand in the notification area.... This is what Unlocker puts in my event log: The description for Event ID 1060 from source Application Popup cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: \??\C:\Program Files (x86)\Unlocker\UnlockerDriver5.sys the message resource is present but the message is not found in the string/message table Upon searching event 1060 I get: <file name> has been blocked from loading due to incompatibility with this system. Perhaps it is because I have 64 bit?

    Read the article

  • What permissions do I need to run SQL*Loader?

    - by Jason Baker
    What permissions does a database user need to be able to run oracle's sql loader? For instance, since sql loader will disable indexes and triggers, does it need ALTER permissions for those items? This seems like a simple question, but I can't find any documentation on this in the manual.

    Read the article

  • In an application, are there multiple permissions that acess internet?

    - by user164945
    In an application, are there multiple permissions that acess internet? Could only part of an application be denied a certain permission, such as internet? Could only the part of the application that is spyware be denied internet permissions, Such as through modifying the files that connect to the internet? spyware X no internet acess (internet) (read) (write) (sound or harware) | permission 1 | permission 2 | permission 3 | permission 4 |

    Read the article

  • Hide admin menu if no admin option is available

    - by Jorge
    If you have a menu "Admin tasks" and different admin tasks (like 10) that you could separately assign to each user, but there are users who don't have any admin tasks, how would you deal with "Hiding admin menu" for those users? I was thinking of 3 ways: 1) Javascript, check if Admin menu is empty and then hide it. 2) Check for all permissions in Admin menu, with a counter, and show it if counter 0. And then also re-check the permissions for each item to show. 3) Save all permissions in associative array. Test all and assign ' true' to granted items. When building the menu, have a function that tests if there is at least one permission granted. I wouldn't need to re-check permissions against DB, just against the array for each item. Is there any better way?

    Read the article

  • In Tripwire For Servers policy what is the difference between ACL and permissions?

    - by this.josh
    I am configuring a policy file for Tripwire For Servers for GNU/Linux (x86) version 4.8.0.167 My system has ext2 and ext3 filesystems. In the policy file the properties include "ACL settings", "permission and file mode bits", and "Flags (additional permissions on object)". What is the difference between ACL settings and permissions for ext2 and ext3 filesystems, and what additional checking does the Flags property provide?

    Read the article

  • XP, how can I copy permissions from one partition to another, had no permssions and getting access denied trying to fix ?

    - by Jules
    For some reason, I'm not sure why, I have no permissions in the security tab/advanced tab for one partition. I'm trying to add them back by copying them manually from another partition. However when I try to replace permissions entries on some files it says access denied, then I have to click continue. I haven't much clue what this is all about, but I'd like to fix this as some folders in my partition aren't accessible in shares from other machines.

    Read the article

  • How to set up project-level permissions for SVN?

    - by ant123
    Hi, I have an SVN server running on Ubuntu 9.04. Inside /var/svn, there are various projects - /var/svn/foo, /var/svn/bar, etc. I want to be able to give user "A" full SVN permissions for 'foo', but not 'bar', and vice versa - user "B" could have permissions to 'bar' but not necessarily 'foo'. What is the best way to do this?

    Read the article

  • How can I recursively verify the permissions within a given subdirectory?

    - by Mike
    I'd like to verify that nothing within /foo/bar is chmod 777. Or, alternatively, I'd like to make sure that nothing within /foo/bar us owned by user1 or in group1. Is there any way I can recursively verify the permissions within a given subdirectory to make sure there aren't any security holes? Notice that I do not want to change all the permissions to something specific, nor do I want to change the owner to something specific, so a recursive chmod or chown won't do it... Thanks!

    Read the article

  • Allow user to download file and filename on client defaults to no extension

    - by Andrew
    I want the user to be able to download a file from a page and have the filename extension in the Save As dialog box to be defaulted to nothing. This is the code I'm using: Response.ContentType = "text/plain" Response.AppendHeader("content-disposition", "attachment; filename=FILE") Response.WriteFile("C:\Temp\FILE") Response.End() FILE is the actual file. It is saved on the server without any extension. Currently, the "Save As Type" drop down list in the dialog defaults to "Text Document". How can I make it so that it defaults to "All Files"?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >